im a chem major and im required to take c++.. i learned some basic stuff (floating point/2s comp systems, basic programming) but im iffy on whether im getting a C or not.. our instructor gave us a bonus assignment but its super complicated and beyond what i understand.. can anybody help me with this??
i need to develop a program that reads from an imput file (studentsGrades.txt) student first name, middle initial, and last name, in addition to his grades in three tests. my program has to calculate the total grades of the three tests for each student and output in an output file (studentResult.txt) the student last name, midille initial and fisrt name, sorted in the alphapatical order of last names, total grade, average and the letter P for pass or F for fail. A student passes if he or she gets more than 60% of the total grade. my program should also produce the avergae grade and the total number of students, the number of those who passed.
my input file (studentsGrades.txt):
Martin A Mason 50 60 50
James P. Thomas 90 70 80
Gary H. Bowman 100 80 70
output file (studentsResult.txt) should look like:
Bowman, H. Gary 250 P
Martin, A. Mason 160 F
Thomas, P. James 240 P
In addition to the output file, it should output to the screen the following:
Number of students processed: 3
Average grade: 216.66
Number of students passed: 2