I need some help with this beginner C++ program (it's an assignment). How can I use a single variable and make the program get the six inputs I need instead of using a variable for each input?#include <iostream>using namespace std;int main(){double grade1,grade2,grade3,grade4,grade5,grade6;double totalGrade;cout << program to calculate grade << endl << endl;cout << hi please enter the six grades ;     << endl << endl;cin >> grade1;cin >> grade2;cin >> grade3;cin >> grade4;cin >> grade5;cin >> grade6;grade1 = grade1 * 0.125;grade2 = grade2 * 0.125;grade3 = grade3 * 0.05;grade4 = grade4 * 0.05;grade5 = grade5 * 0.05;grade6 = grade6 * 0.1;totalGrade = grade1 + grade2 + grade3 + grade4 + grade5 + grade6;if((totalGrade >= 9.5) && (totalGrade <= 10)) {    cout << grade is: >>  << totalGrade << endl << endl;    cout << you have approved +  << endl;    }else if ((totalGrade >= 9) && (totalGrade <= 9.5)) {    cout << grade is >>  << totalGrade << endl << endl;    cout << you have approved - << endl;    }else if (totalGrade < 9) {    cout << grade is: >>  << totalGrade << endl << endl;    cout << you have reproved  << endl;    }return 0;}
User input for student grades is too verbose
c++;beginner;homework