*️⃣ Write a program input number and check if it is even or odd number. *️⃣
Answers
hi mate,
Answer:
C program to check EVEN or ODD
/* c program to check whether number is even or odd*/
#include <stdio.h>
int main()
{
int num;
printf("Enter an integer number: ");
scanf("%d",&num);
/*If number is divisible by 2 then number
is EVEN otherwise number is ODD*/
if(num%2==0)
printf("%d is an EVEN number.",num);
else
printf("%d is an ODD number.",num);
return 0;
}
i hope it helps you.
C program to check EVEN or ODD
/ C program to check wheather number is even or odd /
#include <stdio.h>
int main()
{
int num;
printf("Enter as integer number: ");
scanf("%d",&num);
/ If number is dived by 2 then number is
EVEN otherwise number is ODD /
If(num%2==0)
printf("%d is an EVEN number.",num);
else
printf("%d is an ODD number.",num);
return 0;
}