Answer to Question #33738 in C++ for agboola

Question #33738
use c++ program to calculate the total cgpa of a student doing 40 courses
1
Expert's answer
2013-08-01T07:25:22-0400
#include <iostream>
#include <conio.h>

using namespace std;
//main function
int main()
{
int total=0;//variable for total
for(int i=0;i<40;i++){
//
cout<<"Enter gpa for student course
"<<(i+1)<<": ";
int gpa;
cin>>gpa;
total+=gpa;//add to total
}
//show result
cout<<"
Total gpa of student doing 40 courses is:
"<<total;

int k;
cin>>k;
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS