if-else statement - C Programming 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 » Tweet Share Share Share Share Related Post nested if statement /*If the ages of Ram, sham and Ajay are input through the keyboard, write a program to determine Switch Statement /*Write A Program to print the four-days of week from Monday to Thursday which works upon the choiLadder if or else if statement The marks obtained by a student in 5 different subjects are input through the keyboard. The studenConditional Control Statement ? : /*The easiest way to use conditional control statement*/ #include #include void main() { int n;If Statement - C Programming /*Any Number is input through the keyboard. write a If program.*/ #include #include void main() {
ConversionConversion EmoticonEmoticon