27 lines
511 B
C
27 lines
511 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
int main(void){
|
|
FILE* fichier;
|
|
fichier = fopen("top10", "r");
|
|
int tab[10];
|
|
char oui[30];
|
|
int i;
|
|
int a;
|
|
int alt = 4;
|
|
for(i=0; i<10; i++){
|
|
fread(&tab[i], sizeof(int), 1,fichier);
|
|
fread(&oui[i*3], 1, 3, fichier);
|
|
}
|
|
for(i=0; i<10;i++){
|
|
printf("%9d ", tab[i]);
|
|
printf("%c", oui[i*3]);
|
|
printf("%c", oui[i*3+1]);
|
|
printf("%c\n", oui[i*3+2]);
|
|
}
|
|
fclose(fichier);
|
|
return EXIT_SUCCESS;
|
|
}
|
|
/*[004867123,41545574]
|
|
[B,O,B,<,O,>]
|
|
004867123 BOB
|
|
41545574 <O>*/ |