Basic Program but I need Help
I have to write this program that does the following:
You are to implement a C++ program that meets the following criteria:
1) Retrieves the number of records from the beginning of a file
2) Perform a counted loop (while/for) that will iterate for each of the records.
3) These records will consist of the FORM:
numberofgrades name grade1 …. GradeN
example: 5 Mike 100 100 100 100 100
4) Calculates an average as well as the concepts of the min/max
grade entered for that particular student.
5) Perform error checking on each entered grade received to ensure
it is valid, since we are getting this input from a file, error
messages should be supressed when they occur but during
output should be noted.
I am in an introductory course and this is our second project. Myself along with the rest of the class is completely confused... I'm not asking for a complete code from someone, just some guidance. I really do not know much about the C/C++ language due to lack of proper teaching and the book is just as confusing.
The input should look like this:
2 // total number of students
5 Terry 100 100 100 100 100 // the first student “record”
2 Susan 100 100 // the next student “record”
The output should look like this:
Student name: Student Average: Min: Max:
Name1 average1 min1 max1
Name2 average2 min2 max2
People keep asking if know how to use arrays and stuff but we haven't learned any of that. We know the very very basics and thats all. Somehow the prof wants us to open another file that I believe will have the code w/ formulas but I dont understand why we need another file....something to do with header files too, I just don't know what these all are and how to use them. I read the book so I dont want to hear read the book and go to class because I do every week...I just need help getting started and understanding why we need header files and to open a file and as far as the input.... is it even possible to input the numbers and name like that? i didnt think that the comp would recognize that. anyways can someone help me out? oh also we're studying swapping... i kind of understand that but not exactly how to write it. thanks for your time