diff --git a/Taschenrechner.java b/Taschenrechner.java index 32ac949..433886b 100644 --- a/Taschenrechner.java +++ b/Taschenrechner.java @@ -20,6 +20,10 @@ public class Taschenrechner { int temp = 1; + if(b == 0) { + return 1; + } + for(int i = 0; i < b; i++) { temp = temp * a; }