From 5132012565c7f30b4d30fc47af49c4b07ba3b937 Mon Sep 17 00:00:00 2001 From: fdai7446 <––fdai7446@fhfddvz1.rz.hs-fulda.de> Date: Fri, 10 Feb 2023 14:06:27 +0100 Subject: [PATCH] startTaschenrechner --- Taschenrechner.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Taschenrechner.java b/Taschenrechner.java index 1cd9d6c..0506fe5 100644 --- a/Taschenrechner.java +++ b/Taschenrechner.java @@ -66,14 +66,18 @@ public class Taschenrechner { int s = scan.nextInt(); + scan.close(); + switch (s) { case 1: { addition(s, s); + break; } case 2: { division(s, s); + break; } default: throw new IllegalArgumentException("Unexpected value: " + s);