Computer Science, asked by Anonymous, 1 year ago

*️⃣ Write a program input number and check if it is even or odd number. *️⃣


blackpinf4ever: Java program right?
Anonymous: Nope it's C++
blackpinf4ever: Oh okay idk c++
Anonymous: Okay

Answers

Answered by nilesh102
3

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.

Answered by Amrit111Raj82
2

Hi\:

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;

}

Mark as brainiest

Similar questions