Write a program to accept a number and check whether the number is divisible by 3 as well as5
Answers
Answered by
0
Answer:
class divisible{
static void result(int N)
{
for (int num = 0; num < N; num++)
{
// Short-circuit operator is used
if (num % 3 == 0 && num % 5 == 0)
System.out.print(num + " ");
}
}
public static void main(String []args)
{
int N = 100;
result(N);
}
Explanation:
Answered by
2
Answer:
Hi..
It's a python code...
Explanation:
Hope it helps you
Please mark brainliest
Attachments:
Similar questions