+ 1
What error is showing in this code.I am not able to understand and why it shows 00 in starting.
3 Answers
+ 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;
}
+ 1
You need to move the cin above the cout for both a and b