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
and codesolutions.blogspot.com
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
Post a Comment