Write a program that inputs two numbers. It then calculates and displays the quotient and remainder.

  public static void main(String[] args) { Scanner n=new Scanner(System.in); int a, b,div,rem; System.out.println(“Enter 1st Values”); a= n.nextInt(); System.out.println(“Enter 2nd Values”); b=n.nextInt(); div=a/b; rem=a%b; System.out.println(“quotient is=”+div); System.out.println(“remainder is=”+rem); } } …

Read More