Menu

Quotient of two numbers without using / operator- Java Program

import java.util.*;
class Display_quotient_without_divisor{
public static void main(String args[]){

System.out.println("Enter the numbers for the division");
Scanner sc = new Scanner(System.in);
int n1 =sc.nextInt();
int n2= sc.nextInt();
int quotient=0;

while(n1>=n2)
{
n1 - =n2;
quotient++;
}
System.out.println("The quotient is "+ quotient);


  }}