Hi

I have a question that I could do with some help with.

1. Have got a college assignment to poduce a mileage chart.
I have to read 10 place names and a list of miles from a text file and enter it into a chart.

I have the following code I can get it to display the place names across the top and down the left hand column but I cannot get it to display the miles it just displays 0's.
I have tried changing the code and it seems to be looping throught to pick up the names from the text file, but not continuing to loop through and pick up the miles.

I have attached the code below and also the text file.

If there is anything obvious I have missed or missed out of the text file please let me know.

**********Code*****************
Code:
#include <stdio.h>
#include <string.h>

int menu(void);
void readFile(void);
void showchart(void);

int grid[10][10];

char names[10][5];

void showchart ()
{
int x, row, col;

FILE *in_file;
in_file = fopen("places.txt","r");

for (x=0;x<=9; x++)
{
fscanf(in_file, "%4c", names[x]);
}

printf("\n     ");

for (x=0; x<=9; x++)
{
printf("%6s",names[x]);
}

printf("\n");
for (row=0; row<=9; row++)
{
printf("%s", names[row]);
	for(col=0; col<=9; col++)
{
	fscanf(in_file, "%d", &grid[row][col]);
	printf("%6d", grid[row][col]);
}
printf("\n");
}
fclose(in_file);
}
***************end of code*************

The text file is as follows


***************text file****************

DealHullMullFordMuckButeIonaYorkWallSarkDeal
0
23
12
89
456
123
46
732
345
123
23
0
46
234
123
46
89
234
567
90
12
46
0
767
456
46
234
123
732
35
89
234
767
0
732
32
48
67
98
100
456
123
456
732
0
234
46
89
89
732
123
46
46
32
234
0
123
46
123
234
46
89
234
48
46
123
0
46
89
19
732
234
123
67
89
46
46
0
123
732
345
567
732
98
89
123
89
123
0
89
123
90
35
100
732
234
19
732
89
0

*********** End of Text File************