A simple program that I wrote using C++ to ask the user to give a number and then the program will check if the given number is an odd or even number.
I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.
Program Listing
// Author : Jake Rodriguez Pomperada,MAED-IT, MIT
// Date : October 7, 2020 9:55 PM
// Website : www.jakerpomperada.com / www.jakerpomperada.blogspot.com
// Email : jakerpomperada@gmail.com
#include <iostream>
using namespace std;
int main() {
int num=0;
cout << "\n\n";
cout << "\tEven and Odd Number Checker in C++";
cout << "\n\n";
cout << "\tGive a Number : ";
cin >> num;
cout << "\n\n";
if(num % 2 == 0)
cout<<"\tThe given number "<<num<<" is an even number.";
else
cout<<"\tThe given number "<<num<<" is an odd number.";
cout << "\n\n";
cout << "\tEnd of Program";
cout << "\n\n";
}
No comments:
Post a Comment