Write a program to enter two numbers and divide the larger number by the smaller number and display the result
Answers
Answered by
3
import java.util.*;
public class Result
{
public static void main(String args[])
{
Scanner in= new Scanner(System.in);
int m,n, l,k,j;
System.out.println("Enter the numbers");
m=in.nextInt();
n=in.nextInt();
l=Math.max(m,n);
k=Math.min(m,n);
j=l/k;
System.out.println("The result is"+j);
}
}
Similar questions
Social Sciences,
6 months ago
Math,
6 months ago
Math,
6 months ago
Biology,
11 months ago
Math,
11 months ago
Physics,
1 year ago
Geography,
1 year ago
Environmental Sciences,
1 year ago