Program... question

closed account (zTUXoG1T)
hmmm i trying to make this
Modify the program so that if the user scored a 90-100 it informs the user that they scored an A

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <iostream>
using namespace std;

int main()
{
     int iChoose;
     cin >> iChoose;
     
     if (iChoose == 100) {
                 cout << "You have Scored Perfekt" << endl;
                 }
     
     system("PAUSE");
     }


how i can make 90 - 100 ??? i tryed to make iChoose = 90-100; but this no work
http://cplusplus.com/doc/tutorial/operators/

In particular, read up on the Relational and Equality Operators and the Logical Operators.

closed account (zTUXoG1T)
i have read it so its not a code for 90 - 100 i need put every if (iChoose == 90) && (iChoose == 91) ...... && (iChoose == 100)

im right ? or it is a code for 90 (-) 100

Note :
the - is not MINUS (SUBTRACTION)
Translate this in C++: if iChoose is greater than or equal to 90 and smaller than or equal to 100 ...
read http://cplusplus.com/forum/beginner/1988/
as to why you shouldn't use system, there's better ways, for instance char a; cin >> a;
Topic archived. No new replies allowed.