Calculate your GPA in 1st Semester
Calculate your GPA in 1st Semester
C++ Code:
# include <iostream>
# include <iomanip>
using namespace std;
char subGrades[6][3];
void calGPA(char subGrades[][3])
double gradePoints = 0;
double gpa;
for (int i = 0; i < 6; i++)
if (i!=1)
if (strcmp(subGrades[i], "A") == 0)
gradePoints = gradePoints + (3.0*4.0);
else if (strcmp(subGrades[i], "A-") == 0)
gradePoints = gradePoints + (3.0*3.7);
else if (strcmp(subGrades[i], "B+") == 0)