Take an integer value as input and determine whether it is odd or even.

#include <stdio.h>

int main(void)
{
int num;

printf("\nEnter a number : ");
scanf("%d", &num);

if(num % 2 == 0)
{
printf("\n%d is even",num);
}
else
{
printf("\n%d is odd",num);
}


return 0;
}

No comments:

Post a Comment

kiss on google ads if you are anonymous because your ip is trackable.thank you.

......from.admin