19 lines
438 B
C
19 lines
438 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
int main(void) {
|
||
|
FILE* f = fopen("top10", "r");
|
||
|
|
||
|
if (f) {
|
||
|
for (int i = 0; i < 10; i++) {
|
||
|
if (!feof(f)) {
|
||
|
int score;
|
||
|
char nom[4];
|
||
|
fread(&score, sizeof(int), 1, f);
|
||
|
fread(nom, sizeof(char), 3, f);
|
||
|
printf("%09d %s\n", score, nom);
|
||
|
} else break;
|
||
|
}
|
||
|
fclose(f);
|
||
|
}
|
||
|
}
|