+ 1

What is the problem in this program??

#include <iostream> using namespace std; int main() { int num1, num2; cout<<"Enter the value of num1"<<endl; cin>>num1; cout<<"Enter the value of num2"<<endl; cin<<num2; cout<<"the sum is"<<num1+num2; return 0; }

27th Oct 2023, 1:45 PM
Haram Abbas
Haram Abbas - avatar
8 Respostas
+ 10
cin>>num2 instead of cin<<num2
27th Oct 2023, 2:26 PM
Sakshi [Offline 🙃]
Sakshi [Offline 🙃] - avatar
+ 6
Haram Abbas It doesn't give error, I already checked it.
28th Oct 2023, 1:43 PM
Sakshi [Offline 🙃]
Sakshi [Offline 🙃] - avatar
+ 1
I write but still giving error
28th Oct 2023, 11:02 AM
Haram Abbas
Haram Abbas - avatar
0
Ok Thanks
27th Oct 2023, 3:31 PM
Haram Abbas
Haram Abbas - avatar
0
#include <iostream> using namespace std; int main() int n=9; if(n%2==0); { cout<<"Even number"; } else { cout<<"odd number"; return 0; }
27th Oct 2023, 3:51 PM
Haram Abbas
Haram Abbas - avatar
0
What is problem
27th Oct 2023, 3:51 PM
Haram Abbas
Haram Abbas - avatar
0
Replace cin<<num2 with cin>>num2
29th Oct 2023, 2:59 AM
Amresh Kumar Chaurasiya
Amresh Kumar Chaurasiya - avatar
0
Ok I got it Thank you
29th Oct 2023, 10:09 AM
Haram Abbas
Haram Abbas - avatar