From ceea30ec999804b83977465698a165c28a2822d5 Mon Sep 17 00:00:00 2001 From: Yaroslav Orlianskyi Date: Thu, 21 Apr 2022 21:07:27 +0200 Subject: [PATCH] SDA --- du6/program.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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++) {