IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
Program to check whether a no. is even or odd.
1. // Program to check whether a no. is even or odd.
#include <iostream.h>
#include <conio.h>
void main()
{
clrscr();
int num;
cout<<"n Enter the no. you want to check: ";
cin>>num;
if ((num%2)==0)
{cout<<" nThe no. is even";
}
else
{cout<<" nThe no. is odd";
}
getch();
}