1.
WRITE
A C PROGRAM to check whether the given
number is divisible by 3 and 5 or not.
#include<stdio.h>
#include<conio.h>
int main()
{
int n;
printf("Enter
any number: ");
scanf("%d",
&n);
if(n%3==0
&& n%5==0)
printf("%d
is divisible by 3 and 5",n);
else
printf("%d
is not divisible by 3 and 5",n);
return 0;
}
No comments:
Post a Comment