+ 1

Failing to make a calculator (Solved but advice still appreciated)

I'm trying to make a calculator. I just want two numbers to add, integer variables X and Y. So far the console has no errors and outputs the first two lines. And independently it outputs both X and Y and can add 1 to them. However when I add them together it just leaves the line blank, no errors. Code below https://code.sololearn.com/c4eNlcPTvgd4/?ref=app P.S. I know there are probably a thousand calculator examples that can do 100 times more, I want to create one that I made most of not that was copied from someone else.

13th Feb 2020, 1:38 PM
Blitzkriegster
Blitzkriegster - avatar
4 ответов
+ 3
One scanner is enough.
13th Feb 2020, 1:47 PM
Mihai Apostol
Mihai Apostol - avatar
+ 2
Well then, I feel quite stupid Mihai Apostol. Tried what you said and that took only about 10 seconds. Thanks!
13th Feb 2020, 1:51 PM
Blitzkriegster
Blitzkriegster - avatar
+ 1
Blitzkriegster You're welcome.
13th Feb 2020, 1:52 PM
Mihai Apostol
Mihai Apostol - avatar
+ 1
why not double ?
13th Feb 2020, 10:10 PM
zemiak