+ 1

What error is showing in this code.I am not able to understand and why it shows 00 in starting.

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

10th Sep 2020, 2:10 PM
Saurabh Singh
3 ответов
+ 4
See this #include <iostream> using namespace std; int main() { int a; int b; cin>>a; cin>>b; cout<<"before swaping of a="<<a<<"b="<<b<<endl; a=a*b;// a=a×b b=a/b;// b=a÷b a=a/b; cout<<"after swaping of a="<<a<<"b="<<b<<endl; return 0; }
10th Sep 2020, 4:16 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 1
You need to move the cin above the cout for both a and b
10th Sep 2020, 2:35 PM
Heng Jun Xi
Heng Jun Xi - avatar