Computer Science, asked by nsaveetha1977, 3 months ago

wap to take two number and check that the first number is fully divisible by second number or not

Answers

Answered by anindyaadhikari13
1

Question:-

  • WAP to take two number and check that the first number is fully divisible by second number or not.

Program:-

This is written in Java.

import java.util.*;

class Number

{

public static void main(String args[])

{

Scanner sc=new Scanner(System.in);

System.out.print("Enter first number: ");

int a=sc.nextInt();

System.out.print("Enter second number: ");

int b=sc.nextInt();

if(a%b==0)

System.out.println("Fully Divisible");

else

System.out.println("Not Divisible");

}

}

Similar questions