From df1ff306552c5596c35412e0c3a29b0b34bad5a3 Mon Sep 17 00:00:00 2001 From: fdai7446 <––fdai7446@fhfddvz1.rz.hs-fulda.de> Date: Fri, 10 Feb 2023 14:39:50 +0100 Subject: [PATCH] eingabe --- Taschenrechner.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Taschenrechner.java b/Taschenrechner.java index afddb1f..cc52237 100644 --- a/Taschenrechner.java +++ b/Taschenrechner.java @@ -59,8 +59,13 @@ public class Taschenrechner { return Math.PI; } - void eingabe() { + int eingabe() { + Scanner scan = new Scanner(System.in); + int intScan= scan.nextInt(); + + scan.close(); + return intScan; } void startTaschenrechner() {