Physics, asked by DANGERGAMING, 6 months ago

//to check divisibility by 17 or not
class CHECK
{
void method (int n)
{
if(n%17==0)
System.out.print("DIVISIBLE BY 17" +n);
else
System.out.print("NOT DIVISIBLE BY 17" +n);
}
}
/*Q1)Write a program to input any number
check it is divisible by 17 or not.
Display the appropriate result*/​

Answers

Answered by bhavee1257
0

Answer:

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

Mark me as brainliest bro

Similar questions