// oddOrEven1.cpp
//
// Tests whether a number is odd or even.
// Uses two separate if statements.
#include <iostream>
using namespace std;
int main()
{
// Announce purpose of program:
cout << "This program test whether a positive integer"
<< " is odd or even." << endl;
// Input the number to be tested:
int number;
cout << "Enter the number to be tested:>";
cin >> number;
// Test the number and display result:
if ( number % 2 == 0 ) // i.e. if number is even
cout << number << " is even." << endl;
if ( number % 2 == 1 ) // i.e. if number is odd
cout << number << " is odd." << endl;
return 0;
} // function main