21 lines
436 B
C
21 lines
436 B
C
|
|
#include <stdio.h>
|
||
|
|
#include <stdlib.h>
|
||
|
|
|
||
|
|
int main(void){
|
||
|
|
int score,i;
|
||
|
|
char nom[3];
|
||
|
|
FILE* file;
|
||
|
|
file=fopen("top10","r");
|
||
|
|
if (file==NULL){
|
||
|
|
printf("mauvaise ouverture");
|
||
|
|
return EXIT_FAILURE;
|
||
|
|
}
|
||
|
|
printf("|Hall of Fame|\n");
|
||
|
|
for (i=0;i<10;i++){
|
||
|
|
fread(&score,4,1,file);
|
||
|
|
fread(&nom,3,1,file);
|
||
|
|
printf("%09d %s\n",score,nom);
|
||
|
|
}
|
||
|
|
fclose(file);
|
||
|
|
return EXIT_SUCCESS;
|
||
|
|
}
|