Hello everyone,
I need to write a program that ask the user for 18 grades, each grade out of 100, and caclulates the points value based on the score. For instance, if the user got 100 on each of the 18 quizzes then the point total would be 54. How would I write this equation. Heres my code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include <iostream>
#include <cstdlib>
usingnamespace std;
void basalGrade(int bgrade)
{
int x, a, total = 0;
cout << "BASAL Gradebook:" << endl;
for (x = 1; x <= 18; x++)
{
cout << " Enter BASAL grade #" << x << " (out of 100): ";
cin >> a;
total = total + a; // for illustration
}
cout << "BASAL points earned: " << total << endl;
}
I'm going to guess that there are up to three points available per quiz (based on a maximum possible of 54 points from all 18 quizzes). This is not enough information. What are the criteria for awarding zero/one/two/three points in the quiz?
This is all the information I have, and you are correct there are 3 points per quiz. From what I can guess I have to figure out the 54 points total based on the user grade. e.g. 1800 points = 54 pts.
Is it possible to write something like total = 3 * .a ?
I'm absolutely crap at mathematics, but it seems like a rule of three might cut it here?
Some one please correct me if I'm entirely missing the plot here.