1.5K
The remainder is the integer left over after dividing one integer by another. The quotient is the quantity produced by the division of two numbers.
In this program we are going to compute Quotient and Remainder using java.
public class QuotientRemainder {
public static void main(String[] args) {
int dividend = 25, divisor = 4;
int quotient = dividend / divisor;
int remainder = dividend % divisor;
System.out.println("Quotient = " + quotient);
System.out.println("Remainder = " + remainder);
}
}
What You get as Output , After running the program
Quotient = 6
Remainder = 1
Happy Programming:)