diff --git a/a1/program.c b/a1/program.c index 000ac4b..ff49043 100644 --- a/a1/program.c +++ b/a1/program.c @@ -18,13 +18,24 @@ int main() { int counter = 0; int che = 0; int count = 0; + int toc = 0; while ((r = fgets(znaky, LINE_SIZE, stdin)) != NULL) { if (feof(stdin)) { break; } if(znaky[0] == '\n'){ break; - } + } + for(int i = 0; i < 10; i++){ + if(znaky[i] == '.'){ + toc++; + } + } + //printf("-->%d\n", toc); + if(toc != 2){ + che = 1; + toc = 0; + } zaciatok_cisla = znaky; counter = 0; while (*zaciatok_cisla != '\0') {