A C++ Program to Check For Even Or Odd Number - Wisdom Lighter

Sunday, 1 July 2018

A C++ Program to Check For Even Or Odd Number

Takes input from the user, and checks whether the number entered is even or odd.

#include <iostream>
#include <stdio.h>
#include <conio.h>

using namespace std;

int main ()

{

 int test ;
 cout << " Enter a number to check even or odd " << endl;
 cin >> test ;

 if (test % 2 == 0) {

cout << " its a even number " << endl ;

 } else {

cout << " its an odd number " << endl ;

 }

  getch();

2 comments:
Write comments
  1. Here at this site really the fastidious material collection so that everybody can enjoy a lot.

    Creative Logo

    ReplyDelete
  2. Finding the best backpacking water purifier is an important yet confusing, experience. A few too many protozoan cysts in your water on a backpacking trip and you’ll be doubled over in your tent wishing for home. But do you need to filter or purify that water to make it safe to drink? Should you get something that removes viruses or protozoa like Giardia and https://redefineadventure.com/the-best-lighters-for-best-adventure-experience

    ReplyDelete