I need help with these If statements they are not compiling , I want a message saying its greater than 0 to be an output when first number multiplied by the second number is greater than 0 then a second if statement with a message saying that if the third number entered is bigger than the first number entered than a message to appear saying so.And if both don’t apply then a third if statement which says a message saying that none are true test.
cout << "Please Enter The first integer: ";
cin >> numb1;
cout << "Please Enter The second integer: ";
cin >> numb2;
cout << "Please Enter The third integer: ";
cin >> numb3;
sum = numb1 * numb2
if (sum > 0)
cout << "Sum is greater than 0 "<<sum <<endl;
elseif (numb3 > numb1)
cout <<"numb3 is greater than numb1" << numb3<< endl;
if ((sum > 0) || (numb3 < numb1))
{
cout <<"No test are true" <<endl;
Maybe it's a compiler problem? I'd also suggest organizing and indenting everything properly for easier readability. Also shouldn't you change line 18 to if((sum>0) && (numb3 <numb1))?
On a side note, when you're asking about a basic concept such as an if/else statement, you should post in the beginners' section of this forum.