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
Math,
5 months ago
Math,
5 months ago
Social Sciences,
5 months ago
Biology,
10 months ago
Math,
10 months ago
Physics,
1 year ago
Geography,
1 year ago
Environmental Sciences,
1 year ago