1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
double calculateQuizScore (double Q1, double Q2, double Q3, double Q4);
int main ()
{
double name, Q1, Q2, Q3, Q4, A1, A2, A3, midTerm;
cout << "Enter 4 quiz grades here, hitting enter after each grade: ";
cin >> Q1 >> Q2 >> Q3 >> Q4;
cout << calculateQuizScore (Q1, Q2, Q3, Q4) << endl;
}
double calculateQuizScore (double Q1, double Q2, double Q3, double Q4)
{
Q1 = (Q1 * 10) / 15;
Q2 = (Q2 * 10) / 100;
Q3 = (Q3 * 10) / 20;
Q4 = (Q4 * 10) / 25;
return (Q1+Q2+Q3+Q4 * 25) / 40;
}
|