Browse Source

squareroot funktion

remotes/origin/Abdelrahman
Abdelrahman 11 months ago
parent
commit
5aeb57ca56
  1. 9
      src/c/funktionen.c

9
src/c/funktionen.c

@ -8,4 +8,13 @@ float square(float x) {
return x * x;
}
float squareRoot(float x) {
if (x >= 0) {
return sqrt(x);
} else {
printf("Error: Invalid input for square root!\n");
return 0;
}
}
Loading…
Cancel
Save