title: work out how many times a number divides into another in java and print it out
body: <p>I need to be able to input two numbers, divide the first by the second and output how many times it goes into it and what the remainder is.</p>
  
  <p>I can print out the remainder but how do I work out how many times the number divides by?
  My code is as follows</p>
  
  <pre><code>import java.util.Scanner;
  
  public class TotalAndRemainder
  {
  
      public static void main(String[] args)
      {
          Scanner keyboard = new Scanner(System.in);
  
          System.out.println("Enter your first number");
          int firstvalue = keyboard.nextInt();
  
          System.out.println("Enter your second number");
          int secondvalue = keyboard.nextInt();
  
          int total = firstvalue / secondvalue;
          int remainder = firstvalue % secondvalue;
  
  
  
          System.out.println("The remainder is " + remainder);
  
      }
  }
  </code></pre>