How to determine the number not divisible by 7 in c programming:

Sunday, March 15, 2009

How to determine the number not divisible by 7 in c programming: This program will determine the numbers which are not divisible by 7 up to a given range. The code of this program is given bellow. Program code: #include #include void main() { clrscr(); int i,n; printf("Enter the value of n:"); scanf("%d",&n); for(i=1;i<=n;i++) { if(i%7==0) continue; printf("%d ",i); } getch(); } After run the program the program will take a number as input. Suppose if you enter 56 then the out put of the program will be the following. OUTPUT:

0 comments:

Visitors

PlugIn.ws - Free Hit Counter, Web Site Statistics, Traffic Analysis

  © Blogger template Leaving by Ourblogtemplates.com 2008

Back to TOP