Browse Source

refactoring: function got smaller

remotes/origin/gaussscheSummenformel
Hendrik Sitzmann 11 months ago
parent
commit
c4b75b1b9d
  1. 6
      src/gaussscheSummenformel/gaussscheSummenformel.c

6
src/gaussscheSummenformel/gaussscheSummenformel.c

@ -2,9 +2,5 @@
int gaussscheSummenformel(int n) {
int result = n * (n + 1);
result = result / 2;
return result;
return (n * (n + 1)) / 2;
}
Loading…
Cancel
Save