+ 1
What error is showing in this code.I am not able to understand and why it shows 00 in starting.
2 Réponses
+ 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