123456789101112131415
#include <iostream> using namespace std; void readTestScores(double & exam, double &tavge) { double score, total = 0; cout << "ENTER EXAM SCORE\t: "; cin >> exam; cout << "ENTER ALL TEST SCORES\t: "; for (int count = 1; count <= 7;count=count+1) { cin >> score; total= total + score; } tavge = (total / 7);
#include <iostream> using namespace std; void readTestScores(double & exam, double &tavge) { double score, total = 0; cout << "ENTER EXAM SCORE\t: "; cin >> exam; cout << "ENTER ALL TEST SCORES\t: "; while(-99.00) { cin >> score; total= total + score; } tavge = (total / -99.00);
while(score != -99.00)
tavge = (total / -99.00);
tavge = (total / count);
cin >> exam;
cin >> score;