#include<stdio.h>
#include<conio.h>
void main( )
{
clrscr( );
int a:
printf("Enter the number");
scanf(%d",&a);
if(a%5==0 && a%8==0)
{
printf("The number is divisible by both 5 and 8")'
}
else if(a%5==0)
{
printf("divisible by 5");
}
else if(a%8==0)
{
printf("divisible by 8");
}
getch();
}
To run:
output:

No comments:
Post a Comment
theengineerschoice01@gmail.com