program to check whether a no. is even or odd
TRANSCRIPT
// 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();}