N NATURAL NUMNERS DIVISIBLE BY 3 BUT NOT DIVISIBLE BY 4

/*PROGRAM TO PRINT FIRST N NATURAL NUMNERS DIVISIBLE BY 3 BUT NOT DIVISIBLE BY 4*/
#include<stdio.h>
#include<conio.h>
void main()
{
int i,n;
clrscr();
printf(“Enter the limit: “);
scanf(“%d”,&n);
printf(“Numbers upto %d which are divisible by 3 and not by 4 are: \n”,n);
for(i=1;i<=n;i++)
{
if((i%3==0)&&(i%4!=0))
printf(“%d “,i);
}
getch();
}

Leave a Reply

Your email address will not be published. Required fields are marked *