Q. Write a program to accept an integer and check if it is even or odd
Program #include <stdio.h> int main() { int number; printf("Enter an integer: "); scanf("%d", &number); if(number % 2 == 0) printf("%d is even.", number); else printf("%d is odd.", number); }
0 Comments