Initialization
This commit is contained in:
		
							parent
							
								
									bae377a353
								
							
						
					
					
						commit
						3b4e295c1e
					
				@ -15,7 +15,12 @@ int main() {
 | 
			
		||||
        return 1;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    while (scanf(" %s", temp_name)!= EOF && num_accepted < max_students) {
 | 
			
		||||
    while (fgets(temp_name, sizeof(temp_name), stdin) != NULL && num_accepted < max_students) {
 | 
			
		||||
        size_t len = strlen(temp_name);
 | 
			
		||||
        if (len > 0 && temp_name[len-1] == '\n') {
 | 
			
		||||
            temp_name[len-1] = '\0';
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        int i, found = 0;
 | 
			
		||||
 | 
			
		||||
        for (i = 0; i < num_accepted; i++) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user