Program Using Interactive Iterations To Display Whether The Entered Number Is Even Or Odd
/* Program Using Interactive Iterations To Display Whether The Entered Number Is Even Or Odd */ #include
#include
void main() { int n; char ch; clrscr(); do { printf("\nEnter a number\n\n"); scanf("%d",&n); if(n%2==0) printf("\n%d is an even number\n",n); else printf("\n%d is an odd number\n",n); fflush(stdin); printf("\nenter 'y' or 'Y' to continue\n\n"); ch=getchar(); } while(ch=='y'||ch=='Y'); getch(); }
Please send comments to
vgdarur.javafive@blogger.com
Copyright © 2008 - iForeRunner.com
http://www.iforerunner.com/