smallGauss function

int smallGauss(
  1. int n
)

calculate the sum of all integers until n

Implementation

int smallGauss(int n) => n * (n + 1) ~/ 2;