Computer Science, asked by LoveDose01, 5 months ago

C Program to check if number is even or odd.

Answers

Answered by pratyush15899
13

Program code:

#include<stdio.h>

int main()

{

int num;

printf("Enter an integer: ");

scanf("%d",&num);

if ( num%2 == 0 )

printf("%d is an even number", num);

else printf("%d is an odd number", num);

return 0;

}

Output:

Enter an integer: 66

66 is even number

Enter an integer: 3

3 is an odd number

✌✌

Similar questions