Computer Science, asked by moonshreya9, 3 months ago

Write a program to enter a number and check if it is divisible by 5 or not. Display "divisible by 5" or "Not divisible by 5".​

Answers

Answered by diwanmobiles
0

Answer:

15 it is divisible by 5

Answered by Anonymous
1

Answer:

In BlueJ:

class number

{

   public static void main(int n)

   {

       if(n%5==0)

       System.out.println("divisible by 5");

       else

       System.out.println("not divisible by 5");

   }

}

Explanation:

Similar questions