practice programs

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
#include <iostream>
using namespace std;

int main()
{
    int score;

    cout<<" *** Grading! ***"<<endl;
    cout<<" Please enter score: ";
    cin>>score;

    if (score==100){
        cout<<"you scored a perfect score! good job. ("<<score<<")"<<endl;
    }

    if (score==91 || score==92 || score==93 || score==94 || score==95 || score==96 || score==97 || score==98 || score==99){
        cout<<"You got an A!";
    }

    else {
        cout<<score<<", not bad!";
    }


cin.get();
return 0;

}


right... so is there any way to signal "90 TO 99"...instead of writing it all out. i tried 90-99 but that clearly means "90 subtracted by 99" so it must be a written code i think

thanks for the help.
so is there any way to signal "90 TO 99"
1
2
3
if(score>=90 && score<=99) {

}
what does && mean? but i understand the logic in what you wrote so thats good i think
'&&' is a logical and.
It reads as: if score is greater than or equal to 90, and score is less than or equal to 99.
Topic archived. No new replies allowed.