C++ Program To Check Even Or Odd Using Pointer

Problem:- Write A Program To Find A number Is Even Or Odd Using Pointer or c++ program to find even and odd numbers using function or c++ program to find odd or even using class or c++ program to find even and odd numbers using array or c program to print even numbers in an array or even odd program in c++ using an array or c++ odd or even loop or c++ program to check whether a number is even or odd using a function or c program to check whether a number is prime or not using the function or c program for even or odd using for loop

Check This:- Hacker rank solution for Strings, Classes, STL, Inheritance in C++.

Logic:- As we know that if the number is less than zero than a number is Negative or if a Number is Greater than Zero then the number is Positive or any case number is equal to zero. So in this problem we are comparing if the entered number by the user is less than zero or greater than zero or if the both condition fails than a number is definitely zero or we can say entered a number is zero.

Also Check:- Geeksforgeeks solution for School, Basic, Easy, Medium, Hard in C++.

Extreme Recommended:- If this post is beneficial for you and you want Updates for New post then please like our Facebook Page or Join our Facebook Group and Google plus Community for up-to-date for a new post or if you have any Query you can ask there with lots of coders also suggest to your Friends to join and like our page, so we can help our community, and don't forget to Subscribe. Enter your Email and click to subscribe.


using namespace std;
int main()
  int a;
  int *p1;
  cout<<"Enter The Number You Want to Check \n\n";
  cout<<"Number Is Possitive \n";
  else if(*p1<0)
  cout<<"Number Is Negative \n";
  cout<<"Number Is Equal to Zero\n\n";
  return 0;



C++ Program To Check Even Or Odd Using Pointer

You May Also Like

1. C++Program To Calculate Factorial Of A Given Number Using Loop

2. C++ Program To Print A Message Multiple Times Using Loop

Ghanendra Yadav

Ghanendra Yadav

Hello, I Am Ghanendra Yadav Owner of This Blog, I am professional Blogger and Programmer. I Love Programming, Logo Making, And Banner Designing. My Highest Qualification is MCA From NIT Warangal. You Can Find Me On Social Media Through Below Link And If You Have Any Query Related To Programming And Other Subject Comment Below or You Can Mail Me I Will Try To Answer Within 24 Hours Email:- yghanendra@student.nitw.ac.in

Find me on Social Media

Facebook | Twitter | Google+ | RSS Feed

1 comment: