Wednesday, October 7, 2020

Even and Odd Number Checker in C++

 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.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.

Program Listing

// odd_even.cpp
// 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