0

I want to make this game

I want to make a program allow you to enter a number then take your number and use it to arithmetic operators. Like this : I enter ( 10 ) , then the program make this ( 10 + 10 - 10 * 10 / 10 ) This is my code: int x; cout<<"Let's play a game \nEnter any number:"; cin>>x; x += x; x -= x; x *= x; x /= x; cout<<"x = "<<x; return 0; But it does not work !!!

9th Nov 2018, 4:12 PM
Mohanad Methkal
10 odpowiedzi
+ 4
This work, but x/x is 1, example: 5/5=1 10/10=1 987654321/987654321=1
9th Nov 2018, 4:21 PM
InvBoy [ :: FEDE :: ]
InvBoy [ :: FEDE :: ] - avatar
+ 3
What compiler do you use? Try another, maybe it's just that
9th Nov 2018, 6:49 PM
InvBoy [ :: FEDE :: ]
InvBoy [ :: FEDE :: ] - avatar
0
What does not work? Is the output incorrect or does it not run?
9th Nov 2018, 4:19 PM
Felix
Felix - avatar
0
I receive a message that says : ....... .exe has stopped working
9th Nov 2018, 4:57 PM
Mohanad Methkal
0
just try it on your pc then watch
9th Nov 2018, 4:58 PM
Mohanad Methkal
9th Nov 2018, 5:08 PM
Felix
Felix - avatar
0
try it on pc, it is not working
9th Nov 2018, 5:29 PM
Mohanad Methkal
0
i use the one whice this app told us to download
9th Nov 2018, 6:51 PM
Mohanad Methkal
0
I slove the answer and I will share it tommorrw
9th Nov 2018, 6:51 PM
Mohanad Methkal
0
It works fine for me. Try using a different compiler.
9th Nov 2018, 9:22 PM
ReimarPB
ReimarPB - avatar