#include<stdio.h> int main() { int number; printf("Enter number:"); scanf("%d",&number); if(number%2 == 0) printf("Entered number is even."); else printf("Entered number is odd."); return 0; } /* Sample Output Enter number:5 Entered number is odd. */
This blog assists in mastering C and C++ programming skills from basics to advanced levels.
Pages
Saturday, March 12, 2016
Program to check whether entered number is odd or even.
Labels:
Branching
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment