Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int cnt(void)
- {
- FILE* in = fopen("input.txt", "r");
- int res = 0;
- int tmp = 0;
- while (!feof(in))
- {
- char c;
- fscanf( in, "%c", &c);
- if (c == ' '){
- if (res ==101)
- ++res;
- tmp = 0;}
- else if ('0' <= c && c <= '9')
- tmp = tmp *10 + c - '0';
- else FIGACH OSHIBKU
- }
- if (tmp == 101)
- ++res;
- printf("%d", res);
- }
Advertisement
Add Comment
Please, Sign In to add comment