@ -428,7 +428,17 @@ int compare(int a, int b) {
}
int exponentiation(int base, int exponent) {
if (exponent < 0) {
printf("Negative Exponenten werden nicht unterstützt.\n");
return 0;
int result = 1;
for (int i = 0; i < exponent; ++i) {
result *= base;
return result;