.
This commit is contained in:
parent
78d996f608
commit
2328b025f4
BIN
du6/program
BIN
du6/program
Binary file not shown.
@ -24,17 +24,35 @@ int main(){
|
||||
if(pocet>pocet_mien){
|
||||
pocet=pocet_mien;
|
||||
}
|
||||
int index=0;
|
||||
|
||||
puts("Prijati studenti:");
|
||||
for(int i=0; i<pocet; i++){
|
||||
printf("%s\n", mena[i]);
|
||||
while(strcmp(mena[index], mena[index +1])==0){
|
||||
index++;
|
||||
}
|
||||
if(index>=pocet_mien){
|
||||
return 0;
|
||||
}
|
||||
printf("%s\n", mena[index]);
|
||||
index++;
|
||||
|
||||
}
|
||||
if(pocet<pocet_mien){
|
||||
puts("Neprijati studenti:");
|
||||
for(int i=pocet; i<pocet_mien; i++){
|
||||
printf("%s\n", mena[i]);
|
||||
while(strcmp(mena[index], mena[index +1])==0){
|
||||
index++;
|
||||
}
|
||||
if(index>=pocet_mien){
|
||||
return 0;
|
||||
}
|
||||
printf("%s\n", mena[index]);
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user