Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Check Whether an number is even or odd
SUBMITTED BY:
Guest
DATE:
Oct. 26, 2014, 12:11 p.m.
FORMAT:
C++
SIZE:
308 Bytes
Raw
Download
Tweet
HITS:
768
Go to comments
Report
#include
<iostream>
using
namespace
std
;
int
main
()
{
int
num
,
con
;
clrscr
();
cout
<<
"Input any integer "
;
cin
>>
num
;
dir
=
num
;
con
=
num
%
2
;
if
(
con
==
0
)
{
cout
<<
"
\n
Integer is Even"
;
getch
();
}
else
{
cout
<<
"
\n
Integer is odd"
;
return
0
;
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus