Update 'cv10/program.c'
This commit is contained in:
		
							parent
							
								
									651bd07061
								
							
						
					
					
						commit
						0affccd25f
					
				@ -20,7 +20,7 @@ int main() {
 | 
			
		||||
    
 | 
			
		||||
    if (scanf("%d\n", &maxStudents) != 1 || maxStudents <= 0) {
 | 
			
		||||
        puts("Nespravny vstup");
 | 
			
		||||
        return 1;
 | 
			
		||||
        return 0; 
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
   
 | 
			
		||||
@ -34,7 +34,7 @@ int main() {
 | 
			
		||||
            names = realloc(names, capacity * sizeof(char *));
 | 
			
		||||
            if (names == NULL) {
 | 
			
		||||
                perror("Failed to reallocate memory");
 | 
			
		||||
                return 1;
 | 
			
		||||
                return 0; 
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
@ -51,7 +51,7 @@ int main() {
 | 
			
		||||
            names[count] = strdup(name);
 | 
			
		||||
            if (names[count] == NULL) {
 | 
			
		||||
                perror("Failed to duplicate name");
 | 
			
		||||
                return 1;
 | 
			
		||||
                return 0; 
 | 
			
		||||
            }
 | 
			
		||||
            count++;
 | 
			
		||||
        }
 | 
			
		||||
@ -59,7 +59,7 @@ int main() {
 | 
			
		||||
    
 | 
			
		||||
    if (count == 0) {
 | 
			
		||||
        puts("Ziadne prihlasky");
 | 
			
		||||
        return 1;
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user