Write a java program to check whether the given number is divisible by 5

Write a java program to check whether the given number is divisible by 5. Enter any integer as an input for this Java program to check if a given number is divisible by 5. To check the divisibility of a given integer by 5, we use the modulus operation. If the given integer divides by 5 with zero as a remainder, it is divisible by 5; otherwise, it is not divisible by 5. source code for the Java Program to Check Whether a Number is Divisible by 5

import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
int n;
Scanner s = new Scanner(System.in);
System.out.print("Enter any number:");
n = s.nextInt();
if(n % 5 == 0)
{
System.out.println(n+" is divisible by 5");
}
else
{
System.out.println(n+" is not divisible by 5");
}
}
}

Enter any number:45
45 is divisible by 5