From 7c8b1382ef2cedd7adea87a4ebd9d6ca6e708991 Mon Sep 17 00:00:00 2001 From: Ricardo Chiriboga <115743728+rachirib@users.noreply.github.com> Date: Sat, 22 Jun 2024 22:50:12 +1000 Subject: [PATCH] docs: n is unknown variable i is the counter for the module of 2, instead of n. --- concepts/loops/introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/concepts/loops/introduction.md b/concepts/loops/introduction.md index 690d8e88..d6793636 100644 --- a/concepts/loops/introduction.md +++ b/concepts/loops/introduction.md @@ -84,7 +84,7 @@ In contrast, the keyword `continue` only stops the execution of the current iter ```cpp int equal_sum{0}; for (int i{1}; i < 7; ++i) { - if (n%2 == 1) { + if (i%2 == 1) { continue; } equal_sum += i;