Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 130 Bytes

gaußsche_summenformel.md

File metadata and controls

14 lines (11 loc) · 130 Bytes

Gaußsche Summenformel

1 + 2 + 3 + 4 + ..+ n = 1/2 * n * (n+1)

12 => 78

ruby

def gauss(n)
  n*(n+1)/2
end