Browse Source

refactoring: structure

remotes/origin/gaussscheSummenformel
Hendrik Sitzmann 11 months ago
parent
commit
fe04e06a08
  1. 3
      src/gaussscheSummenformel/gaussscheSummenformel.c

3
src/gaussscheSummenformel/gaussscheSummenformel.c

@ -1,7 +1,10 @@
#include <stdio.h> #include <stdio.h>
int gaussscheSummenformel(int n) { int gaussscheSummenformel(int n) {
int result = n * (n + 1); int result = n * (n + 1);
result = result / 2; result = result / 2;
return result; return result;
} }
Loading…
Cancel
Save