Here is a collection of some C++ programs. All these programs were constructed in turbo C++. These programs can be used by following simple steps :
1>Follow this blog
2>Copy the program
3>Paste it in the notepad
4>Save as ".cpp" file
5>Run the program
Followers
Saturday, December 3, 2011
CHECK EVEN OR ODD NUMBER
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a;
cout<<"Enter any number : ";
cin>>a;
(a%2==0)?cout<<"Even number":cout<<"Odd number";
getch();
} ................................................................. OUTPUT:(click on image to enlarge)
No comments:
Post a Comment