19 lines
289 B
C
19 lines
289 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <string.h>
|
||
|
|
||
|
int main(int argc, char const *argv[])
|
||
|
{
|
||
|
FILE *f;
|
||
|
f=fopen("top10","r");
|
||
|
int n;
|
||
|
char name[3];
|
||
|
for(int i = 0;i<10;i++)
|
||
|
{
|
||
|
fread(&n,4,1,f);
|
||
|
printf("%09d ",n);
|
||
|
fread(&name,1,3,f);
|
||
|
printf("%s \n",name);
|
||
|
}
|
||
|
fclose(f);
|
||
|
}
|