Meri kalam se
Wednesday, 16 February 2022
Even Odd number in C
#include
<stdio.h>
int
main
(){
int
a
;
printf
(
"Enter a number:"
);
scanf
(
"
%d
"
,&
a
);
if
(
a
%
2
==
0
)
{
printf
(
"
%d
is an even number"
,
a
);
}
else
{
printf
(
"
%d
is an odd number"
,
a
);
}
return
0
;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment