Advertisement
okelikai

oddDetector

Oct 17th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     int numberInput, remainderValue;
  7.  
  8.     cout << "Enter a Number: ";
  9.     cin >> numberInput;
  10.     remainderValue = numberInput % 2;
  11.     if (remainderValue == 0)
  12.         cout << numberInput << " is an even integer." << endl;
  13.     else
  14.         cout << numberInput << " is an odd integer." << endl;
  15.  
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement