Answer to Question #71341 in C++ for yalfal kassaw

Question #71341
reade an integer value from the keybord and display a message indicating if this number is odd or even
1
Expert's answer
2017-11-28T15:31:07-0500
#include <iostream>
using namespace std;

int main()
{
int n;
cout << "Enter number: ";
cin >> n;
if (n%2)
cout << "Number is odd" << endl;
else
cout << "Number is even" << 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