Browse Source

power() definiert

remotes/origin/habib
Habib 11 months ago
parent
commit
06459ab130
  1. 10
      src/c/funktionen.c

10
src/c/funktionen.c

@ -31,4 +31,14 @@ int subtract(int num1, int num2) {
int divide(int num1, int num2) {
return num1 / num2;
}
int power(int base, int power) {
int speicher = 1;
for (int i = 0; i < power; i++) {
speicher *= base;
}
return speicher;
}
Loading…
Cancel
Save