Computer Science, asked by ashik367, 4 months ago

Write a program to find the quotidian of two numbers

Answers

Answered by Anonymous
0

I think u mean quotient

note- u have to import scanner for it

HERE IS THA JAVA PROGRAM-

Scanner sc = new Scanner(System.in);

int firstNumber = sc.nextInt;

int secondNumber = sc.nextInt;

int ans =0;

if(secondNumber==0){

System.out.println("Denominator cannot be 0");

}

else{

ans = firstNumber/secondNumber;

}

System.out.println("Quotient of the given numbers is " + ans);

Similar questions