You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
304 B
C++
19 lines
304 B
C++
5 years ago
|
#include <iostream.h>
|
||
|
#include <conio.h>
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
clrscr();
|
||
|
int n;
|
||
|
cout << "Enter an integer: ";
|
||
|
cin >> n;
|
||
|
if ( n%2 == 0)
|
||
|
{
|
||
|
cout << n << " is even.";
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
cout << n << " is odd.";
|
||
|
}
|
||
|
getch();
|
||
|
}
|