Could someone tell me what I am doing wrong, I am trying to put them in columns on the output with Headers of ID, Score1, Score2, Average. here is what I have.
#include <stdio.h>

int main()
{
int id;
float score1;
float score2;
float avg;
FILE *scores;
FILE *scores1;
scores=fopen("scores.dat","r");
scores1=fopen("scores.out","w");
while (!feof(scores) )
{
avg=(score1+score2)/2;
fscanf(scores, "%i%f%f%f",&id, &score1, &score2, &avg);
fprintf(scores1,"ID%i \t\t Score1%.2f \t\t Score2%.2f\t\t Average%.2f\n",id, score1,score2,avg);
}

fclose(scores);
fclose(scores1);

return 0;
}