Hello world program _ find Even Odd Numbers in c++

Source Code:
#include<iostream>
#nclude<conio.h>
using namespace std; 
int main()
{
 cout<<"Hello Word"<<endl;
cout<<"Welcome to MH Computer Academy ";
   getch();
}
OutPut:
Hello Word
Welcome to MH Computer Academy

1. How to find Even and Odd no in C++ language

 #include<iostream>
#include<conio.h>
using namespace std;
int main()
{
int n=0;
cout<<"Please!!! Enter a Number:";
cin>>n;
if(n%2==0)
  {
   cout<<"Yes !!! You Entered an Even Number";
   }

else
if(n%2!=0)
  {
   cout<<"Sorry!!! You Entered an Odd Number";
   }
}
For More Programs Visit : MH Computer Academy 
and codesolutions.blogspot.com

Comments

Popular posts from this blog

How to create Simple ATM Machine in C++ Program||ATM Program deposit withdraw money in c++|Using CLI || C++ project with Source Code || MH Computer Academy(Muhammad Hashmi)

How to Calculate GPA/CGPA || GPA Calculator Step by Step in C++ ||Sourc...

C++ Project GYM Management System || Source Code with Explanation | MH Computer Academy || Muhammad Hashmi || Learn Programming