+ 1
What's wrong with this code?
#include <iostream> using namespace std; int main() { int a,b,c; cout <<"This is my calculator:"; cout <<"Enter a:" ; cin >> a; cout <<"Enter b:" ; cin >> b; c=a+b; cout<< "sum is:" <<c; return 0; }
7 Respostas
+ 3
@Mario Laurisch
the request for input before showing output is a bug in code playground.❓❓❓
Try using other online compilers.It isn't a bug.
Online compilers work in this way.
For dynamic inputs like a statement is outputted and then you are required to input use offline compilers
+ 2
enter two numbers in separate lines.
the request for input before showing output is a bug in code playground.
+ 1
nothing. it works.
+ 1
solo learn asks me inputs before I run the code
what shall I enter?
0
You should write value of a in first li e and in second value of b, cause their compiler wont prompt at the execute time.
0
It works well
There is no error in the code
For multiple inputs we should mention the values separately
0
It works. Maybe the problem is with the compiler. Which compiler do you use?