Answer to Question #71341 in C++ for yalfal kassaw
reade an integer value from the keybord and display a message indicating if this number is odd or even
1
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!
Learn more about our help with Assignments:
C++
Comments
Leave a comment