You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns 1 is num is even otherwise 0
*/
int isEven(int num)
{
return !(num & 1);
}
int main()
{
int num;
/* Input number from user */
printf("Enter any number: ");
scanf("%d", &num);
/* If isEven() function returns 0 then the number is even */
if(isEven(num))
{
printf("The number is even.");
}
else
{
printf("The number is odd.");
}
return 0;
}
The text was updated successfully, but these errors were encountered:
/**
*/
#include <stdio.h>
/**
*/
int isEven(int num)
{
return !(num & 1);
}
int main()
{
int num;
}
The text was updated successfully, but these errors were encountered: