Skip to content
Snippets Groups Projects
Commit 47c7e404 authored by yassin.elhakoun's avatar yassin.elhakoun
Browse files

Update boucles_conditions.md (code optimisé)

parent bf72e886
No related tags found
No related merge requests found
Pipeline #27246 failed
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment