write a java program to check a number is divisible by 25 or not
Answers
Answered by
3
Answer:
import Java. util. scanner;
class peg. uu
{
public static void main(String args [ ])
{
int n;
Scanner sc= system. in();
System.out.println("Enter any number" );
int n=sc.nextInt();
if(n%25==0)
System.out.println("number is divisible by 25");
else
System.out.println("number is not divisible by 25");
}
}
Answered by
3
Answer:
HEY MATE HERE'S YOUR ANSWER!
- import java.util.Scanner;
- public class Check_divisibility
- {
- 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 % 25 == 0)
- {
- System.out.println( n+" is divisible by 25 ");
- }
- else
- {
- System.out.println(n+" is not divisible by 25");
- }
- }
- }
Thus this is your Java Program to check if a number is divisible by 25 or not.
#answerwithquality
PLEASE MARK MY ANSWER AS THE BRAINLIEST
Similar questions