home
Learn
screen_rotation
#include <stdio.h> #include <conio.h> int num; void readNum(){ printf("\n Enter Number: "); scanf("%d",&num); } void calculation(){ int res; res = num % 2; if(res == 0){ printf("\n %d is even number",num); } else{ printf("\n %d is odd number",num); } } void main(){ clrscr(); readNum(); calculation(); getch(); }
Program Output
Enter Number: 10 10 is even number