Java Program:

- To find Quotient and Remainder

Example:

User Input:
Dividend : 7
Divisor : 5

Output:
Quotient : 1
Remainder : 2

import java.util.Scanner;
public class FindQuotientRemainder {
  public static void main(String []args) {
    int divisor, dividend;
    Scanner userInput = new Scanner(System.in);
    System.out.print("Enter your dividend : ");
    dividend = userInput.nextInt();
    System.out.print("Enter your divisor : ");
    divisor = userInput.nextInt();

    System.out.println("Quotient : "+ dividend/divisor);
    System.out.println("Remainder : "+ dividend%divisor);
    
  }
}

Output:

  Enter your dividend : 7
  Enter your divisor : 2

  Quotient : 3
  Remainder : 1
Program
basic
dividend / divisor // use devision( / ) operator to find quotient
dividend % divisor // use modulus( % ) operator to find remainder

modulus( % ) operator used to find remainder, & devision( / ) operator used to find quotient

Concept

Coming Soon !

Quick
Tutorial

Quote

A good decision is based on knowledge and not on numbers.