First commit
This commit is contained in:
8
IUT/Info1/TD/Exercices/8.3_racines_carree/fonctions.cpp
Normal file
8
IUT/Info1/TD/Exercices/8.3_racines_carree/fonctions.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user