Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <ctype.h>
- int main()
- {
- FILE * in = fopen("input.txt", "r");
- char niza[1000];
- while(fgets(niza, 100, in) != NULL) {
- for(int i = 0; i < strlen(niza); i++) {
- if(isdigit(niza[i])) {
- printf("%c", niza[i]);
- }
- }
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement