Skip to content
Snippets Groups Projects
Verified Commit 3f18c894 authored by orestis.malaspin's avatar orestis.malaspin
Browse files

corrected typo

parent 1081d7e6
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@ int main() {
res += i;
}
printf("For = %d, the result is %d\n", n, res);
if (sum != n * (n+1) / 2) {
if (res != n * (n+1) / 2) {
printf("Error: the answer is wrong.\n");
return EXIT_FAILURE;
}
......
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