Write a java program to check if a number is divisible by both 5 and 7
Answers
Answered by
1
Answer:
Java Program to Check Whether Given Number is Divisible by 5
public class Check_Divisiblity.
int n;
Scanner s = new Scanner(System.
System. out. print("Enter any number:");
n = s. nextInt();
if(n % 5 == 0)
System. out. println(n+" is divisible by 5");
System. out. println(n+" is not divisible by 5");
Similar questions