diff --git a/Taschenrechner.java b/Taschenrechner.java index ed7bac9..32ac949 100644 --- a/Taschenrechner.java +++ b/Taschenrechner.java @@ -15,4 +15,15 @@ public class Taschenrechner { return a / b; } + + int potenzieren(int a, int b) { + + int temp = 1; + + for(int i = 0; i < b; i++) { + temp = temp * a; + } + + return temp; + } }