Just a note, were not using arrays or functions, other than main. We've only covered the basics and started to get into <iomanip> and the stuff thats in that liabrary. Thanks in advance.
#include <iostream>
using namespace std;
void main ()
{
const double A = 4.0;
const double B = 3.0;
const double C = 2.0;
const double D = 1.0;
const double F = 0.0;
double LetterGrade_1 = 0, LetterGrade_2 = 0, CreditHours_1 = 0;
double TotalPoints = 0, TotalCreditHours = 0, CreditHours_2 = 0, GPA = 0;
cout << "Please enter letter grade of first class --> ";
cin >> LetterGrade_1;
cout << endl;
cout << "Please enter number of credit hours for first class --> ";
cin >> CreditHours_1;
cout << endl;
cout << "Please enter letter grade for second class --> ";
cin >> LetterGrade_2;
cout << endl;
cout << "Please enter number of credit hours for second class --> ";
cin >> CreditHours_2;
cout << endl << endl;
TotalPoints = (LetterGrade_1 * CreditHours_1) + (LetterGrade_2 * CreditHours_2);
TotalCreditHours = CreditHours_1 + CreditHours_2;
GPA = TotalPoints / TotalCreditHours;
if (GPA < 2.0)
{
cout << "You are doing poorly." << endl << endl;
}
else if (GPA >= 3.5)
{
cout << "Congratulations, doing good." << endl << endl;
}
}