From 47c7e404467c76c0df529b76f6251d84701c4149 Mon Sep 17 00:00:00 2001 From: "yassin.elhakoun" <yassin.el-hakouni@etu.hesge.ch> Date: Wed, 13 Dec 2023 19:06:03 +0100 Subject: [PATCH] =?UTF-8?q?Update=20boucles=5Fconditions.md=20(code=20opti?= =?UTF-8?q?mis=C3=A9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- slides/boucles_conditions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slides/boucles_conditions.md b/slides/boucles_conditions.md index 01f7146..6eb6f32 100644 --- a/slides/boucles_conditions.md +++ b/slides/boucles_conditions.md @@ -17,7 +17,7 @@ int main() { int n = 0; scanf("%d", &n); int res = 0; - for (int i = 0; i <= n; ++i) { + for (int i = 1; i <= n; ++i) { res += i; } printf("For = %d, the result is %d\n", n, res); -- GitLab