Breaking News

Photo in News

Even odd- c++ program



/*
Developed by deepak anand.
For more programs,
visit programming-stuff-4-u.blogspot.in
*/
//WAP to find whether the given number is even or odd.
#include<iostream.h>
#include<conio.h>
void main()
{
  int num;
  clrscr();
  cout<<"Enter the number\n";
  cin>>num;
//logic part
  if(num%2==0)
    cout<<"Given number is Even";
  else
    cout<<"Given number is odd";
getch();
}

No comments:

Total Pageviews

  • Posts
  • Comments
  • Pageviews
Designed By Blogger Templates