I am writing a program to read a list of grades from an array, calculates the average and then gives a grade based on the average. However, I am having debugging issues that I was wondering if...
Type: Posts; User: jl864405
I am writing a program to read a list of grades from an array, calculates the average and then gives a grade based on the average. However, I am having debugging issues that I was wondering if...
So sorry for jumping ahead. Heres my get_data function so far:
void get_data(int ar[])
{
FILE *inp;
inp = fopen("proj7.dat", "r");
fclose(inp);
okay that is much more helpful!
Void function A has to open a separate data file, read it, and then close it. (15 #'s to read)
Void function B then computes the average of these 15 numbers. ...
The function has to read (using a while loop) 15 scores from a separate data file using the declaration of a file pointer and I was unsure of the syntax to do so.
I have a set of scores in a data file and I am having trouble figuring out the correct code to input the scores from the data file into a separate function. Is this a good start?
void...