Self-Learning Module

Outcomes Covered

Watch

Do

public static void main(String[] ignored) {
   System.out.println("Enter an integer");
   Scanner in = new Scanner(System.in);
   String first = in.next();
   // Convert this into an integer called firstNum


   System.out.println("Enter an double");
   String second = in.next();
   // Convert this into a double called secondNum


   System.out.println(firstNum + " goes into " + secondNum + " " +
                      secondNum/firstNum + " times");
}

Sample screenshot

Bonus Material (optional)