Commit feb9e718 by Tobias Langer

Wrong fix

parent 829bb1c5
......@@ -5,11 +5,7 @@
int sum(int n)
{
int sum = 0;
for(int i = 1; i <= n; i++) {
sum += i;
}
return sum;
return (n * (n - 1)) / 2;
}
void usage(const char* app_name, const char* err_string)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment