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);