c 2b 2b even odd

Solutions on MaxInterview for c 2b 2b even odd by the best coders in the world

showing results for - "c 2b 2b even odd"
Alina
26 Feb 2017
1#include <iostream>
2using namespace std;
3
4int main()
5{
6    int n;
7
8    cout << "Enter an integer: ";
9    cin >> n;
10
11    if ( n % 2 == 0)
12        cout << n << " is even.";
13    else
14        cout << n << " is odd.";
15
16    return 0;
17}
18