boost learn study
Tuesday, March 25, 2014
if-else statement - C Programming
/*Any Number is input through the keyboard. write a program to find out whether It is and Odd Number or Even Number.*/
#include< stdio.h >#include< conio.h >void main() { int n; n=1; clrscr(); printf("Enter the Number"); scanf("%d",&n); if(n%2==0) { printf("This is Even Number"); } else { printf("This is Odd Number"); } getch(); }
Output is as :
Enter the Number
4
This is Even Number
Read more �
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment