To print a given number is odd or even. #c
//The Program by Tittu Varghese #include<stdio.h> #include<conio.h> void main() { int x,a; clrscr(); printf("Enter a number\n"); scanf("%d%",&x); a = x%2; if (a==0) printf("The given number %d is even.",x); else printf("The given number %d is odd.",x); getch(); }
Comments
Post a Comment