New Code
This commit is contained in:
@@ -0,0 +1,29 @@
|
|||||||
|
#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;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user