0

Does anyone know how to make a code work properly in this App? When i run it it just shows everything written.

https://code.sololearn.com/cLj7aBNxB2x1/?ref=app

11th Aug 2019, 1:39 PM
-DSaus-
-DSaus- - avatar
9 odpowiedzi
+ 2
-DSaus- Try to give the number inputs in the input dialog as follows (taking 15 and 17 for example): 15 <Enter> 17 Hit Submit button ... I see you have followed Martin Taylor's advice, so tell if there's still a problem. But I'm telling you, interactive input/output like we get in PC/Laptop is not possible here in Playground : )
11th Aug 2019, 2:31 PM
Ipang
+ 1
1. It seems to be running as expected to me, did I miss anything? 2. Did you provide inputs properly at the input dialog? you need to provide all necessary inputs in the beginning, each input can be separated by new line or a space. If there's other problem then edit the question and describe the problem in your Description. Good luck! 👍
11th Aug 2019, 2:11 PM
Ipang
+ 1
Ipang I just want to be able to write the answer to each question(Digit a number) (Digit another number) separetely to get an answer because it just shows me everything. In a Pc program called Dev-C++ i can do it corectly.
11th Aug 2019, 2:13 PM
-DSaus-
-DSaus- - avatar
+ 1
Ipang i just want this code to work like a normal calculator, where you insert one number (cin n1) insert another number(cin n2) and get the four possible solutions (+-*/)
11th Aug 2019, 2:22 PM
-DSaus-
-DSaus- - avatar
+ 1
Ipang Oh, so in Sololearn you cant make interactive programs?
11th Aug 2019, 2:22 PM
-DSaus-
-DSaus- - avatar
+ 1
Ipang ok,thanks anyway! :)
11th Aug 2019, 2:34 PM
-DSaus-
-DSaus- - avatar
+ 1
-DSaus- No we can't create interactive program here, but there's an exception, web codes does support interactive I/O through JavaScript prompt, I think all non web codes reads the inputs for a one way trip (not on demand). I think most online compiler service works that way AFAIK (there are exceptions). You're welcome! glad if it helps ... P.S. Can you please edit the Relevant Tags? maybe 'C++ I/O' just to increase the question validity?
11th Aug 2019, 2:45 PM
Ipang
0
Martin Taylor ok, i will try. Thanks for the advice!
11th Aug 2019, 2:17 PM
-DSaus-
-DSaus- - avatar
0
But the code only requires 2 inputs (numbers), I'm not getting what you mean by "write the answer to each question" (feeling dumb). Wait, you mean you want those 2 numbers to be read one at a time? like interactive inputs? in that case I'm sorry, I have to tell you no, it just isn't supported, provide all inputs in the beginning and run the code, that's all there is. * Tell me if I misunderstood you ...
11th Aug 2019, 2:20 PM
Ipang