1.

Write c programme to check wether a number is odd or ecen

Answer»

#include

int main()

{

int NUMBER;

PRINTF("Enter an integer: ");

scanf("%d", &number);

// True if the number is PERFECTLY DIVISIBLE by 2

if(number % 2 == 0)

printf("%d is EVEN.", number);

else

printf("%d is odd.", number);

return 0;

}



Discussion

No Comment Found