Computer Science, asked by adfrt, 10 months ago

Write a program to enter two numbers and divide the larger number by the smaller number and display the result

Answers

Answered by Anonymous
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