Files
CITISE1/IUT/Info1/TD/Exercices/8.3_racines_carree/fonctions.cpp
2026-04-08 20:11:20 +02:00

8 lines
162 B
C++

float racine_carree(float a, unsigned int n) {
float root = 1;
for (int i=0; i < n; i++) {
root = (root + a / root) / 2;
}
return root;
}