anonymous
  • anonymous
Write a program that will allow you to enter any number of students with five grades for each student. Calculate each student's average and store the student's name, grades and average to a data file.
Computer Science
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
chestercat
  • chestercat
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
pottersheep
  • pottersheep
You want us to write you the program?
pottersheep
  • pottersheep
What's your plan?
harsimran_hs4
  • harsimran_hs4
Do write something about what you have done so far if any psuedocode you have written post it here or any algorithm you have in mind

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
int students; int temp; int total = 0; // get the number of students // loop it that many times // for one student for(int i=0; i < 5; i++){ cout << "Enter score" << endl; cin >> temp; total += temp; } cout << total / 5 << endl;
harsimran_hs4
  • harsimran_hs4
well don`t know cpp but still this should work and put total/5 inside the for loop`s body
anonymous
  • anonymous
struct student_data { string name; double grades[5]; double average; }; student_data getStudentData(); void writeStudentData(student_data); int main() { int students = 1; cin >> students; for(int i = 0; i < students; i++) { student_data s = getStudentData(); writeStudentData(s); } } student_data getStudentData() { get input for the name and the grades here, and calculate the average (store the data in a Student struct, and return it) } void writeStudentData(student_data s) { write the data to a file using fstream library, you could also take an extra string argument to specify file location } My C++ is a bit rusty, but I hope this helps :) I left the two methods blank since you should try to do them yourself first
poopsiedoodle
  • poopsiedoodle
it doesn't even specify a language.
poopsiedoodle
  • poopsiedoodle
can I write it in gibberish? I'm gonna write it in gibberish. RHAUGK WWJHBJCVHJ KBCAW. There's your program :D good luck.
poopsiedoodle
  • poopsiedoodle
but really, if you're taking the class, you should know this. It's not even that hard from what I've read up there.

Looking for something else?

Not the answer you are looking for? Search for more explanations.