Write and Construct Algorithm To Check a Number Divisible By 5 or Nor?
Answers
Answered by
0
Answer:
If a number contains units place as 0,5 then it will be divisible by 5.
hope this helps you mark me as brainliest pls
Answered by
0
Java Program to Check Whether Given Number is Divisible by 5
1. public class Check_Divisiblity.
int n;
2. Scanner s = new Scanner(System.
3. System. out. print("Enter any number:");
n = s. nextInt();
if(n % 5 == 0)
4. System. out. println(n+" is divisible by 5");
5. System. out. println(n+" is not divisible by 5");
Similar questions