Computer Science, asked by Advitiya5040, 1 day ago

Write a program in java to divide a number entered by 13 and display the quotient and the reminder.

Answers

Answered by gautamgxtv
2

import java.util.Scanner; // import the Scanner class

public class Main {

   public static void main(String[] args) {

       Scanner myObj = new Scanner(System.in);

       int number;

       System.out.println("Enter number");

       number = myObj.nextInt();

       quotient = number / 13;

       remainder = number % 13;

       System.out.println("Quotient: " + quotient + " Remainder: " + remainder);

   }

}

Similar questions