82 290
Assignments Done
99,5%
Successfully Done
In January 2020

# Answer to Question #31148 in C++ for bushra rafique

Question #31148
Write a program using structure to calculate CGPA of student.assume there are 20 courses each having either 3 or 4 credit hours.take the name of students,name of course,credit hours,grade,GPA from user and print a transcript containing student name ,course name,grade,credit hours and gpa.
1
2013-06-26T09:37:32-0400
#include <iostream>
#include <string>

using namespace std;

int main()
{

int course,hours;
cout <<"---_CGPA of student_---
";
cout <<"-Enter student's name-:
";
cin >> name;
cout <<"-Enter student's surname-:
";
cin >> surname;

cout <<"-Enter the name of course-:
";
cin >> course;
while ( course >0 && course >21 )
{
cout <<"-Enter the name of course(1 to 20)-:
";
cin>> course;
}

cout <<"-Enter the credit hours-:
";
cin >> hours;
while ( hours!=3 && hours!=4 )
{
cout <<"-Enter the credit hours (3 or 4)-:
";
cin >> hours;
}
";
cout <<"-Enter the GPA-:
";
cin>> GPA;
cout <<"

------Transcript------
";
cout << name << " " << surname <<"
";
cout << "Course " << course <<"
";
cout << "Hours " << hours <<"
";
";
cout << "GPA " << GPA <<"
";

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!

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS