Program: 70
Any Integer is input through the keyboard. Write a C program to find out whether it is an odd number or even number.
#include<stdio.h> #include<conio.h> int main() { int num; printf("Enter any integer: "); scanf("%d", &num); if(num%2==0) { printf("%d is Even Number", num); } else { printf("%d is Odd Number", num); } return 0; }
Output:
Enter any integer: 128 128 is Even Number
Leave a Comment