Computer Science, asked by aninditahw4628, 11 months ago

write a java program to check a number is divisible by 25 or not​

Answers

Answered by kgautam16847
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 MysticDragonEX
3

Answer:

HEY MATE HERE'S YOUR ANSWER!

  1. import java.util.Scanner;
  2. public class Check_divisibility
  3. {
  4. public static void main(String[ ] args)
  5. {
  6. int n;
  7. Scanner s = new Scanner(System.in) ;
  8. System.out.print( "Enter any number:" );
  9. n = s.nextInt.( );
  10. If (n % 25 == 0)
  11. {
  12. System.out.println( n+" is divisible by 25 ");
  13. }
  14. else
  15. {
  16. System.out.println(n+" is not divisible by 25");
  17. }
  18. }
  19. }

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