Aktualizovat „du6/program.c“

This commit is contained in:
Artem Horbunov 2020-04-08 16:25:49 +00:00
parent 81e69debe7
commit 686ef90392

View File

@ -79,7 +79,7 @@ int main(){
//Print names //Print names
if(newLines <= lines){ if(newLines <= lines){
puts("Prijati studenti:"); puts("Prijati studenti:\n");
for(int i = 0; i < newLines; i++){ for(int i = 0; i < newLines; i++){
printf("%s\n", newNames[i]); printf("%s\n", newNames[i]);
} }
@ -88,11 +88,11 @@ int main(){
} }
} }
else{ else{
printf("Prijati studenti:"); printf("Prijati studenti:\n");
for(int i = 0; i <= lines; i++){ for(int i = 0; i <= lines; i++){
printf("%s\n", newNames[i]); printf("%s\n", newNames[i]);
} }
puts("Neprijati studenti:"); puts("Neprijati studenti:\n");
for(int i = lines + 1; i < newLines; i++){ for(int i = lines + 1; i < newLines; i++){
printf("%s\n", newNames[i]); printf("%s\n", newNames[i]);
} }