Skip to content

Commit

Permalink
concept/loops: fix typo (#886)
Browse files Browse the repository at this point in the history
i is the counter for the module of 2, instead of n.
  • Loading branch information
rachirib authored Jun 22, 2024
1 parent 98bd9ed commit 3a3e34e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion concepts/loops/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3a3e34e

Please sign in to comment.