Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis+ 1
What error is showing in this code.I am not able to understand and why it shows 00 in starting.
2 Respostas
+ 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