Help with my program

Ok so heres the code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#include <iostream>
#include <windows.h>
#include <cmath>


//Grade program!

using namespace std;


int grade;
string opt;
int main()
{
cout << "Hello, Please enter the grade you scored on a test from 1-100!\n";
cin >> grade;

{


    while(true)
{
if (opt == "NO")
{
cout<< "Application will now close!";
Sleep(1000);
exit(1);
}

        else if (opt == "YES"){
        system("CLS");
        }


    if (grade <= 59){
    cout << "Your grade is a F!\n";
    }

    else if (grade <= 69 && grade >= 60){
    cout<< "Your grade is a D!\n";
    }

    else if (grade >= 70 && grade <= 79){
    cout<< "Your grade is a C!\n";
    }

    else if (grade >= 80 && grade <= 89){
    cout<< "Your grade is a B!\n";
    }

    else if (grade >= 90 && grade is <= 100){
    cout<< "Your grade is a A! Well done!\n";
    }


        cout<<"Would you like to enter another test score?\n";
cin>> opt;
    }
}













 return 0;
}


and heres the error i get:
|51|error: expected `)' before "is"|

I was just doing this to refresh my mind and im getting this error, Ive never even had it before?
Last edited on
If you did check line 51, then you would've noticed the extra "is" in your comparison. Remove that and you won't get that error anymore. Also, why did you put that extra "{" before while(true)?
Haha i feel so damn stupid :p
Topic archived. No new replies allowed.