Write a C program to check whether a given number is even or odd using the function.
#include
int main()
{
?int num;
?printf("Enter any number: ");
?scanf("%d", &num);
?if(isEven(num))
?{
?printf("The number is even.");
?}
?else
?{
?printf("The number is odd.");
?}
?return 0;
}
int isEven(int num)
{
?return !(num & 1);
}
WorldTimeTech provides Movie News, Troubleshooting, and Programming knowledge. Thank You...
Copyright © 2023 WorldTimeTech.com All Rights Reserved.