Изменить 'du6/program.c'
This commit is contained in:
parent
a0eb4665a5
commit
9cc6726655
@ -40,7 +40,7 @@ char fn[100];
|
||||
for(;stop!=EOF;count++,num--){
|
||||
stop=fscanf(stdin,"%s %s",list[count].sname,list[count].fname);
|
||||
}
|
||||
count=-2;
|
||||
count--;
|
||||
return count;
|
||||
|
||||
}
|
||||
@ -66,10 +66,14 @@ void sort(struct LIS* list,int count){
|
||||
}
|
||||
void print(struct LIS *list,int count,int places){
|
||||
int j=0;
|
||||
int nado=places;
|
||||
if(places>count){
|
||||
nado=count;
|
||||
}
|
||||
if(places>0){
|
||||
puts("Prijati studenti:");
|
||||
for(;j<places;j++){
|
||||
printf("%s %s\n",list[j].sname,list[j].fname);
|
||||
for(;j<nado;j++){
|
||||
printf("%s %s1\n",list[j].sname,list[j].fname);
|
||||
}
|
||||
}
|
||||
if(count-places>0)
|
||||
@ -82,3 +86,4 @@ void print(struct LIS *list,int count,int places){
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user