Computer Science, asked by shweta6474, 6 months ago

Write a program using Java, to print the real quotient obtained by dividing two integers numbers. Also print the remainder obtained after dividing them?

please tell me the correct answer



I will mark as brainlist



who tell me right answer

please tell me ​

Answers

Answered by vedika5582
1

Explanation:

Programiz

Search Programiz

Java Program to Compute Quotient and Remainder

Java Program to Compute Quotient and Remainder

In this program, you'll learn to compute quotient and remainder from the given dividend and divisor in Java.

To understand this example, you should have the knowledge of the following Java programming topics:

Java Hello World Program

Java Operators

hope you can understand my answer follow me and Mark my answer as brain list answer

Answered by Sweetkiller72
1

To compute the quotient and remainder we have created two variables with the name quotient and remainder respectively.

To find the quotient we divide the num1 by num2 using / operator. Since both the variables num1 & num2 are integers, the result will be integer despite the fact that the result of 15/2 is 7.5 mathematically. So the value assigned to the variable quotient after the operation is 7.

To find the remainder, we use the % operator. The remainder of 15/2 i.e 1 is assigned to the variable remainder after operation.

At the end of the program the values of variables quotient and remainder are printed

Mark me as brainlist__"__"__!!!!!!!

Similar questions