From 892284a6db3e2cd98e26e3c3f8631dd8d91bb862 Mon Sep 17 00:00:00 2001 From: Oleksandr Hryshchenko Date: Thu, 15 Apr 2021 18:36:09 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20'du6/program.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ^^ --- du6/program.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/du6/program.c b/du6/program.c index 788e9b0..8b8104f 100644 --- a/du6/program.c +++ b/du6/program.c @@ -11,14 +11,14 @@ int main(){ int count = 0; char temp[50]; - for(int i =0; fgets(inputs[i], 50, stdin) != NULL;; i++){ + for(int i =0; fgets(inputs[i], 50, stdin) != NULL; i++){ if(i == 0){ freePlaces = strtol(inputs[0], &ptr, 10); - if(freePlaces < 0 || !sdigit(freePlaces)){ + if(freePlaces < 0 || !isdigit(freePlaces)){ printf("Nespravny vstup\n"); } } - else if(i == 1 && !salpha(inputs[i][0])){ + else if(i == 1 && !isalpha(inputs[i][0])){ printf("Ziadne prihlasky\n"); return 0; } @@ -54,12 +54,12 @@ int main(){ puts("Prijati studenti:\n"); for(int i = 0; i < finalPosition; i++) { - puts ("%s\n", inputs[i]); + printf ("%s\n", inputs[i]); if(i == 4) break; } puts("Neprijati studenti:\n"); for(int i = 5; i < finalPosition; i++){ - puts("%s\n", inputs[i]); + printf("%s\n", inputs[i]); } free(ptr);