Initialization
This commit is contained in:
		
							parent
							
								
									81ca9d6d44
								
							
						
					
					
						commit
						b3f28e8016
					
				@ -38,22 +38,24 @@ int main() {
 | 
			
		||||
    if (num_accepted == 0) {
 | 
			
		||||
        printf("Ziadne prihlasky");
 | 
			
		||||
    } else {
 | 
			
		||||
        printf("Prijati studenti:\n");
 | 
			
		||||
        printf("Prijati studenti:");
 | 
			
		||||
        for (int i = 0; i < num_accepted; i++) {
 | 
			
		||||
            printf("%s", names[i]);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        printf("\nNeprijati studenti:\n");
 | 
			
		||||
        for (int i = 0; i < num_students; i++) {
 | 
			
		||||
            int found = 0;
 | 
			
		||||
            for (int j = 0; j < num_accepted; j++) {
 | 
			
		||||
                if (strcmp(names[j], temp_name) == 0) {
 | 
			
		||||
                    found = 1;
 | 
			
		||||
                    break;
 | 
			
		||||
        if (num_students > num_accepted) {
 | 
			
		||||
            printf("Neprijati studenti:");
 | 
			
		||||
            for (int i = 0; i < num_students; i++) {
 | 
			
		||||
                int found = 0;
 | 
			
		||||
                for (int j = 0; j < num_accepted; j++) {
 | 
			
		||||
                    if (strcmp(names[j], temp_name) == 0) {
 | 
			
		||||
                        found = 1;
 | 
			
		||||
                        break;
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                if (!found) {
 | 
			
		||||
                    printf("%s", temp_name);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            if (!found) {
 | 
			
		||||
                printf("%s", temp_name);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user