+ 2

Help me with my program please.

So if anyone could tell me what i need to do here I would be really grateful. I'm really new to c++. #include <iostream> using namespace std; int chooseGrade() { cout << "What is the grade"; int grade; cin >> grade; return grade; } int main() { int grade = chooseGrade(); if (grade == 100) { cout << "A+"; } if (grade >=75 && <100) { cout << "B"; } if (grade >=50 && <75) { cout << "C"; } } The error is error: expected primary-expression before '<' token

19th Nov 2017, 1:30 PM
Rislim
Rislim - avatar
1 Answer
+ 14
(grade >= 75 && grade < 100) (grade >= 50 && grade < 75) You cannot omit the variable for the evaluation of the second condition in the statement.
19th Nov 2017, 1:44 PM
Hatsy Rei
Hatsy Rei - avatar