Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

#include<stdio.

h>
int main()
{
int count,i,n,number;
printf("Enter n value \n");
scanf("%d",&n);
count=0,i=1;
while(i<=n)
{
printf("enter your number\n");
scanf("%d",&number);
if(number%3 ==0)
count=count+1;
i=i+1;
}
printf("no.of number is divisible by 3
is:%d\n", count);
return 0;
}

Logic if both 3 and 5

if(number%3 ==0 && number %5 ==0)

You might also like