From 7975c96025cf352ebe5cbc124d7b83c0291433e9 Mon Sep 17 00:00:00 2001 From: "paul.albuquer" <paul.albuquerque@hesge.ch> Date: Mon, 28 Oct 2024 21:23:08 +0100 Subject: [PATCH] Corrected few typos --- slides/cours_6.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/slides/cours_6.md b/slides/cours_6.md index 36aeb20..9aa956d 100644 --- a/slides/cours_6.md +++ b/slides/cours_6.md @@ -1,5 +1,5 @@ --- -title: "Reécursivité, et représentation des nombres" +title: "Récursivité et représentation des nombres" date: "2024-10-29" --- @@ -301,11 +301,11 @@ double pow(double x, int n) { if (0 == n) { return 1; } - double p = c; + double p = x; for (int i = 1; i < n; ++i) { - p = p * x; // x *= x + p = p * x; // p *= x } - return x; + return p; } ``` -- GitLab