Advertisement
MarioPetrov02

Even or Odd

Sep 23rd, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.21 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5.  
  6. int main()
  7. {
  8.     int num; cin >> num;
  9.  
  10.     if (num % 2 == 0)
  11.     {
  12.         cout << "even" << endl;
  13.     }
  14.     else
  15.     {
  16.         cout << "odd" << endl;
  17.     }
  18.  
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement