Computer Science, asked by godgyro29, 3 days ago

Write a program to check whether the given number, 12 is even or odd.​

Answers

Answered by pavankalyan030400
1

Answer:

/* 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;

}

Answered by soniarunkaushik
0

Answer:

num = int (input ( '' Enter any number to test whether it is odd or even :) if ( num % 2 ) == 0: print (" The number is even " )

Similar questions