Java

Program to compute Quotient and Remainder.

Program to compute Quotient and Remainder.
import java.util.*;
import java.lang.*;
import java.io.*;

public class QuotientRemainder {

    public static void main(String[] args) {

        int dividend = 20, divisor = 5;

        int quotient = dividend / divisor;
        int remainder = dividend % divisor;

        System.out.println("Quotient = " + quotient);
        System.out.println("Remainder = " + remainder);
    }
}
Nikhil Juneja

Passionate software developer and technical contributor at TutorialsLink.