Write a program that prompts the use for the number of assignments in a specific class. Then using a for loop, prompt for each score. Use an accumulator to store the sum of the assignments, and then calculate the average score for the assignments.
HELP. I have no idea what's going on.
#include <iostream>
using std::cout;
using std::cin;
int main ()
{
int number = 0,
percent = 0;
cout << "Enter number of assignments: ";
cin >> number;
for ( int assignments = 0; assignments < 5; assignments++ )
{
cout << "Enter percentage of assignment which you did correctly. Assignment " << assignments + 1 << ": ";
cin >> percent;
assignments += percent;
}
return 0;
}