Hi, I keep getting a red squiggly line under my "<<" symbols and I don't know why!!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include<ctime>
#include<iostream>
#include<string>
usingnamespace std;
int main(void) {
int numClass=0; //user's number of classes
int numCred=0; //user's number of credits
int numGrade=0; //user's numeric value for grade
int numSem=0; //user's amount of semesters
float semGPA=0; //user's gpa at the end of each semester
float cumGPA=0; //user's cumuilitive GPA
do {
cout << "Number of classes taken?"<<endl;
cin << numClass;
cout << "How many credits total?" << endl;
cin << numCred;
cout<< "How many semesters have you taken?"<< endl;
cin << numSem;
first you must put the comparison and then the bracket for instructions.
like this If(comparison) {instruction}
You used a Bracket right after the if.
also why are you putting the comparison in two different sets of parenthesis. Cant you do it like this.
Also I notice your using the variable ...grade..... for both the comparison and the input instruction....might want to change the input to something like ...Grade..with a capital G...or ....gradeValue...
if (grade=='a' || grade == 'A') { grade =4};
else if (grade=='b' || grade == 'B') { gradeValue = 3}