24 lines
		
	
	
		
			374 B
		
	
	
	
		
			C
		
	
	
	
	
	
		
		
			
		
	
	
			24 lines
		
	
	
		
			374 B
		
	
	
	
		
			C
		
	
	
	
	
	
|   | #include <stdio.h>
 | ||
|  | #include <stdlib.h>
 | ||
|  | 
 | ||
|  | int main(void){ | ||
|  |     FILE *fic = fopen("text.txt", "r"); | ||
|  |     char texte[256];  | ||
|  |     int age = 0; | ||
|  |     int Nombre = 0; | ||
|  | 
 | ||
|  |     if(fic == NULL){ | ||
|  |         exit(1); | ||
|  |     }     | ||
|  | 
 | ||
|  |     fscanf(fic, "%s %d %d", texte, &age, &Nombre); | ||
|  |     printf("Nom : %s\n", texte); | ||
|  |     printf("Age : %d\n", age); | ||
|  | 
 | ||
|  |     printf("\n"); | ||
|  | 
 | ||
|  |     fclose(fic); | ||
|  | 
 | ||
|  |     return 0; | ||
|  | } |