Take two numbers as input and determine whether the first number is divisible by the second.

#include <stdio.h>

int main(void)
{
int num1, num2;

printf("\nEnter two numbers : ");
scanf("%d%d", &num1, &num2);

if(num1 % num2 == 0)
{
printf("\n%d is divisible by %d",num1,num2);
}
else
{
printf("\n%d is NOT divisible by %d",num1,num2);
}


return 0;
}

No comments:

Post a Comment

kiss on google ads if you are anonymous because your ip is trackable.thank you.

......from.admin