Quest 2.1. DecimalToBinaryCalculator
Quest 2.1. DecimalToBinaryCalculator
10/05/24
Source Code:
Import java.util.Scanner;
// opens the class and declares the main method and scanner
// Starts asking for the decimal number unless the word “STOP” is entered
For (;;) {
If (userInput.equalsIgnoreCase(“STOP”)) {
Try {
} catch (NumberFormatException e) {
System.out.println(“Invalid input! Please enter a valid decimal number or
‘STOP’.”);
Scanner.close();
PROOF SCREENSHOTS: