@Кот Ангенс
318 / 268 / 38
Регистрация: 24.05.2012
Сообщений: 629
|
05.10.2012, 16:31
|
|
C | 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| #include <stdio.h>
int main() {
FILE* f = fopen("input.txt", "r");
short c;
while ((c = getc(f)) != EOF)
if (c == '0') {
fclose(f);
f = fopen("output.txt", "w");
putc('Y', f);
putc('E', f);
putc('S', f);
fclose(f);
return 0;
}
fclose(f);
f = fopen("output.txt", "w");
putc('N', f);
putc('O', f);
fclose(f);
return 1;
} |
|
1
|