-->

program to know a number is divisible by 3 and 5 both or not



//'C' program to know a number is divisible by 3 and 5 both or not
#include<stdio.h>
#include<conio.h>
void main()
{
int x;
printf("enter a number\n");
scanf("%d",&x);
if(x%3==0 && x%5==0)
{
printf("it is divisible by both");
}
else
{
printf("it is not divisible by both\n");
}
getch();
}

No comments:

Post a Comment