3. (B) Write a program to check whether the number is even or odd.

3. (B) Write a program to check whether the number is even or odd.
Write a program to check whether the number is even or odd.



#include <stdio.h>
int main()
{
int n;
printf("Enter an integer\n");
scanf("%d", &n);
if (n%2 == 0)
printf("Even\n");
else
printf("Odd\n");
return 0;
}
3. (B) Write a program to check whether the number is even or odd. 3. (B) Write a program to check whether the number is even or odd. Reviewed by admin on December 23, 2019 Rating: 5

No comments:

Powered by Blogger.