Alright, so the first column from the data file is the year the storm came (yearStorm)
the second column is Accumulated Cyclone Energy value (ace)
the third column is the number of tropical storms that came (numStorm)
Ok, so I've added these variables and also included a fprintf() in my file, but still, nothing shows up.
Code:
#define FILENAME "ace_data.txt"
int main (void)
{double yearStorm;
double ace;
double numStorm;
FILE *inp,
*outp;
inp = fopen("FILENAME", "r");
outp = fopen("ace_data.out", "w");
if (inp == NULL )
printf("Error opening file. Ending program...\n");
else{
fscanf(inp, "%d %d %d \n")
fprintf(outp, "%d %d %d\n", yearStorm, ace, numStorm);
}