Nantes Université

Skip to content
Extraits de code Groupes Projets
Valider c9ddbf18 rédigé par Sebastien FAUCOU's avatar Sebastien FAUCOU
Parcourir les fichiers

typos dans sqrt.go

parent 15d00ea3
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
package main
import (
"fmt"
"fmt"
)
func main() {
const y float32 = 2
var x float32 = 1
var xnext float32 = 10
const y float32 = 2
var x float32 = 1
var xnext float32 = 10
for x*x == y {
var tmp float32 = x - ((x*x - y) / (2 * x))
fmt.Println(tmp)
x = xnext
xnext = tmp
}
fmt.Println("sqrt(" ,y ,") = ", x)
for x*x != y {
var tmp float32 = x - ((x*x - y) / (2 * x))
fmt.Println(tmp)
x = xnext
xnext = tmp
}
fmt.Println("sqrt(" ,y ,") = ", x)
}
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter