Answer to Question #7941 in C++ for ronnie

Question #7941
write a program using the if else statement
1
Expert's answer
2012-03-30T06:51:53-0400
//include this file for cout
#include <iostream.h>

int main()
{
// define two integers
int x = 3;
int y = 4;

//print out a
message telling which is bigger
if (x > y) {
cout << "x is bigger
than y" << endl;
}
else {
cout << "x is smaller than y"
<< endl;
}
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS