this is suppose to read the following information from the keyboard for a set of students:
Name
Age
GPA
this is how far i got, i made lines to the information, i just cant figure out, any help would be helpful, any input or ideas at all.
thanks
Code:
typedef struct
{
char Name[50];
_int age_;
_double GPA_;
}Students;
int main()
{
FILE *fpout;
fpout = ______________________;
if(__________)
{
printf("file output.txt can not be opened!");
return(100);
}
Students ______________;
for(int i = 1; i < 4; i++)
{
printf("Please enter the student's name:\n");
scanf("_%d_", _&name__);
printf("Please enter the student's Age:\n");
scanf("%d", _&age_);
printf("Please enter the student's GPA:\n");
scanf("_%d_", _&GPA_);
fprintf(fpout, "__Student %d %d%d", name, age, GPA__",
_________________________________, students[i].GPA);
}
return 0;
}