Home
About Us
Contact Us
Privacy Policy
Home
Programs
_C Programs
_C++ Programs
_Python Programs
Operations on Data
_Searching
Projects
_Python
About Us
Contact Us
Privacy Policy
Home
C Program
C Program To Check Whether the Number is Even or Odd
C Program To Check Whether the Number is Even or Odd
Coding PLEX
January 06, 2022
PROGRAM :
main.c
#include
<stdio.h>
int
main
()
{
int
a
;
printf
(
"Enter a number
\n
"
);
scanf
(
"%d"
,&
a
);
if
(
a
%
2
==
0
)
{
printf
(
"
\n
%d is EVEN"
,
a
);
}
else
{
printf
(
"
\n
%d is ODD"
,
a
);
}
}
#include
int main() { int a; printf("Enter a number \n"); scanf("%d",&a); if(a%2==0) { printf("\n%d is EVEN",a); } else { printf("\n%d is ODD",a); } }
Copy
OUTPUT :
Enter a Number
42
42 is EVEN
Post a Comment
0 Comments
Featured Post
QR Code Generator
QR Code Generator Application in Python Using Kivy Module - Beginner's Python Project For Students
Coding PLEX
January 21, 2022
Here is the Complete Code For the QR Code Generator Application in Python Using Kivy …
Popular Posts
Social Plugin
Labels
C Program
18
Python Program
11
Projects
8
Python Turtle Arts
5
C++ Program
3
Games
1
0 Comments