Even and positive

Report a typo

Write a C++ program that accepts an integer from the user and determines if the given integer is even and positive.

Sample Input 1:

2

Sample Output 1:

2 is a positive even number.

Sample Input 2:

-2

Sample Output 2:

-2 is not a positive even number.

Sample Input 3:

3

Sample Output 3:

3 is not a positive even number.

Sample Input 4:

-3

Sample Output 4:

-3 is not a positive even number.
Write a program in C++





Create a free account to access the full topic