+ 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; }
8 Respostas
+ 10
cin>>num2 instead of cin<<num2
+ 6
Haram Abbas
It doesn't give error, I already checked it.
+ 1
I write but still giving error
0
Ok Thanks
0
#include <iostream>
using namespace std;
int main()
int n=9;
if(n%2==0);
{
cout<<"Even number";
}
else
{
cout<<"odd number";
return 0;
}
0
What is problem
0
Replace cin<<num2 with cin>>num2
0
Ok I got it
Thank you