diff --git a/du6/program.c b/du6/program.c index 7c6be40..cd42d11 100644 --- a/du6/program.c +++ b/du6/program.c @@ -18,13 +18,13 @@ int main() { r = fgets(string, 1000, stdin); if (r == NULL) return 0; - sscanf(string, "%d", &count); - if (strlen(r) == 1 || count < 1) { + sscanf(string, "%d", &count); + if(strlen(r) == 1 || count < 1) { puts("Nespravny vstup"); return 0; } - for (int с = 0; с < 30; с++) { - if (isalpha(r[с])) { + for (int c = 0; c < 30; c++) { + if (isalpha(r[c])) { error = 1; break; } @@ -56,7 +56,7 @@ int main() { } } - if (i==0) { + if (i == 0) { puts("Ziadne prihlasky"); } for (int j = 0; j < i; j++) {