Computer Science, asked by shweta6474, 7 months ago

Write a program to check the divisibility of number a by another number say b

please tell me the correct answer


I will mark as brainlist


who tell me right ​

Answers

Answered by divyamJoshi
1

Explanation:

Given an integer N where

1 \leq n \leq 10^{18}. The task is to check whether the number is not divisible by any of its digit. If the given number N is divisible by any of its digits then print “YES” else print “NO”.

Examples:

Input : N = 5115

Output : YES

Explanation: 5115 is divisible by both 1 and 5.

So print YES.

Input : 27

Output : NO

Explanation: 27 is not divisible by 2 or

Answered by nivethap1012
3

Answer:

include <stdio.h>

void main()

{

int a, b;

printf("enter values of a and b");

scanf("%d %d, &a &b");

if(a%b==0)

{

printf("it is divisible");

}

else

{

printf("it is not divisible");

}

}

Explanation:

a%b returns the remainder when a is divided by b.

so if(a%b==0) it means a is divisible by b

Similar questions