Изменить 'du6/program.c'
This commit is contained in:
		
							parent
							
								
									0b29479f3f
								
							
						
					
					
						commit
						b1b107fb81
					
				@ -35,7 +35,10 @@ char keep(struct LIS* list,int places){
 | 
				
			|||||||
int count=0;
 | 
					int count=0;
 | 
				
			||||||
char names[100];
 | 
					char names[100];
 | 
				
			||||||
    for(;fgets(names,100,stdin);){
 | 
					    for(;fgets(names,100,stdin);){
 | 
				
			||||||
        if(names[0]=='\n') continue;
 | 
					        if(names[0]=='\n'){
 | 
				
			||||||
 | 
					            list[count].num=-1;            
 | 
				
			||||||
 | 
					            continue;
 | 
				
			||||||
 | 
					        }    
 | 
				
			||||||
        if(sscanf(names,"%s %s",list[count].fname,list[count].name)==2){
 | 
					        if(sscanf(names,"%s %s",list[count].fname,list[count].name)==2){
 | 
				
			||||||
            count++;
 | 
					            count++;
 | 
				
			||||||
            if(places>=count){
 | 
					            if(places>=count){
 | 
				
			||||||
@ -83,10 +86,6 @@ void print(struct LIS *list,int count,int places){
 | 
				
			|||||||
        if(places>0){
 | 
					        if(places>0){
 | 
				
			||||||
            printf("Prijati studenti:\n");
 | 
					            printf("Prijati studenti:\n");
 | 
				
			||||||
            int i=1;
 | 
					            int i=1;
 | 
				
			||||||
            if(count==1){
 | 
					 | 
				
			||||||
                i=0;
 | 
					 | 
				
			||||||
                count--;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            for(i;i<=count;i++){
 | 
					            for(i;i<=count;i++){
 | 
				
			||||||
                if(list[i].num==2 && list[i].fname[0]!='\n'){
 | 
					                if(list[i].num==2 && list[i].fname[0]!='\n'){
 | 
				
			||||||
                    printf("%s\n",list[i].fname);
 | 
					                    printf("%s\n",list[i].fname);
 | 
				
			||||||
@ -112,3 +111,17 @@ void print(struct LIS *list,int count,int places){
 | 
				
			|||||||
        puts("Ziadne prihlasky");
 | 
					        puts("Ziadne prihlasky");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user