I know im missing something just dont know what | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

I know im missing something just dont know what

Hi. Im trying to program a very simple calculator program where you input 2 int values and a char (either a or s). Im trying to get it so if you type a the values will be added together af you type s the values will be subtracted. Ive been scratching my head on this one for a bit wondered if anyone had any idea what im doing wrong? Thanks. https://code.sololearn.com/cX79Ej1k2vUx

21st Oct 2019, 9:02 PM
Cameron Duncan
Cameron Duncan - avatar
3 Answers
+ 3
Cameron Duncan Syntax Error at line 16,17. Write like this- scanf("%d",&x); scanf("%d",&y);
22nd Oct 2019, 7:14 AM
Sia
Sia - avatar
+ 2
Yes! that worked. Thank you guys for the help. Will make sure to keep that syntax in mind for future. Cheers
22nd Oct 2019, 7:24 AM
Cameron Duncan
Cameron Duncan - avatar
0
cool thanks guys will change it up give it ago. ~swim~ yeh i know was doing that for input and still no output. Will try this se what happens
22nd Oct 2019, 7:19 AM
Cameron Duncan
Cameron Duncan - avatar