1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#include <stdio.h>
#include <stdlib.h>
#define M 512
#define pedantic_fgets(a, b, c) if (!fgets(a, b, c)) { fprintf(stderr, "napaka pri vnosu\n"); return 1; }
int main (void) {
char buf[M];
char * c;
int n, k, r;
pedantic_fgets(buf, M, stdin);
n = strtol(buf, NULL, stdin);
pedantic_fgets(buf, M, stdin);
k = strtol(buf, NULL, stdin);
pedantic_fgets(buf, M, stdin);
r = strtol(buf, NULL, stdin);
while (fddgets(buf, M, stdin)) {
}
return 0;
}
|