C++ Program to Find Even Odd number



c++ program to find whether a number is even or odd




#include<stdio.h>
#include <iostream>
using namespace std;
int main(){

int number;

cout << "Enter any integer: ";
cin >> number;

if(number % 2 ==0)
cout << number << " is even number.";
else
cout << number <<" is odd number.";

return 0;

}

OUTPUT:
Enter any integer: 15
15 is odd number.




---------------------------------------------------------------------------------------------


---------------------------------------------------------------------------------------------













---------------------------------------------------------------------------------------------


---------------------------------------------------------------------------------------------

------------------------------------------------------
Searches related to C++ program to check given number is odd or even
c++ program to find whether a number is even or odd
write a c program to find the given number is even or odd
Check Odd or Even Number in C++ | Free C & C++ Programs
C++ Program to Find Even Odd number
Learning to Program: To check whether the number is Even or Odd
even/odd program help - C++ Forum
c program to check odd or even
C++ program to check given number is odd or even
C++ program to print all odd numbers in given range
C++ code to print all odd and even numbers in given range
C++ code to get sum of all odd numbers in given range

Comments

Post a Comment