Archive for the ‘CODE’ Category

C program to print number’s till limit, Except those that are divisible by 8

September 22, 2010

//To print no. till limit, except those that are divisible by 8
#include<stdio.h>
#include<conio.h>
void main()
{
int n,i;
clrscr();
printf(“Ener a limit”);
scanf(“%d”,&n);
for(i=1;i<=n;i++)
if(i%8!=0)
printf(“\n%d”,i);
else
continue;
getch();
}

Hope you liked my posts, give comments if you have any doubts…:)

(more…)