+ 1

How do I continue if I'm to create a software to calculate a students Grade Point Average.

#include <iostream> using namespace std; int main() { // Grades int csc111; cout << "Enter csc111 grade" << endl; cin >> csc111; int csc112; cout << "Enter csc112 grade" << endl; cin >> csc112; int csc113; cout << "Enter csc113 grade " << endl; cin >> csc113; int csc114; cout << "Enter csc114 grade" << endl; cin >> csc114; int csc115; cout << "Enter csc115 grade" << endl; cin >> csc115; // Units int Unit111; cout << "Enter Unit111" << endl; cin >> Unit111; int Unit112; cout << "Enter Unit112 \n"; cin >> Unit112; int Unit113; cout << "Enter Unit113 \n"; cin >> Unit113; int Unit114; cout << "Enter Unit114 \n"; cin >> Unit114; int Unit115; cout << "Enter Unit115 \n"; cin >> Unit115; int TotalUnit; TotalUnit= Unit111+Unit112+Unit113+Unit114+Unit115; cout << "TotalUnit is: " << TotalUnit<<endl; int Totalcsc; Totalcsc= csc111+csc112+csc113+csc114+csc115; cout << "Totalcsc is: " << Totalcsc<< endl; int GradePoint; GradePoint= Totalcsc*TotalUnit; cout << "GradePoint is: " <<GradePoint<<end

20th Feb 2020, 3:58 PM
Agbesanwa Michael
3 Antworten
+ 1
I want the output to be on a scale of 0 to 5 points. 0- fail 1- Pass 2- Pass 3- Credit 4- Merit 5- Distinction How do I input this?
20th Feb 2020, 4:02 PM
Agbesanwa Michael
+ 1
Thanks alot. I'll work on it.
20th Feb 2020, 4:44 PM
Agbesanwa Michael
0
Average can be calculated as total sum of values divided by number of values.. Ex: 1+2+3+4=10 10/4=2.5 average.. Use the swich cases to display result.. switch(grade_avg) { case 0: cout<<"fail" ; break; case 1: cout<<"pass" ; break; .... .... } Hope this helps you...
20th Feb 2020, 4:30 PM
Jayakrishna 🇮🇳