I have a text file which will contain a mock record of imaginary people and in said record I have 3 numbers which I have to find an average of everytime I read and print the text file. I was wondering the best way to do this as I can not figure it out. Picture posted of text file format.
When I print the text file, because I need it in a specific tabulated format I print it character by character using this:
while ((ch = fgetc(pRead)) != EOF)
{
putchar(ch);
}
and when it saves the data there are different numbers of spaces between saved records.