29 lines
432 B
C
29 lines
432 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
/* Finding if a given number is EVEN or ODD*/
|
|
|
|
int main()
|
|
{
|
|
|
|
int num;
|
|
|
|
printf("\n");
|
|
printf("This programm checks if a number is even or odd.\n");
|
|
printf("Please enter a number: ");
|
|
|
|
scanf("%d", &num);
|
|
|
|
if (num % 2 == 0)
|
|
{
|
|
printf("The number is EVEN\n");
|
|
}
|
|
else
|
|
{
|
|
printf("The number is ODD\n");
|
|
}
|
|
|
|
printf("\n");
|
|
|
|
return 0;
|
|
} |