Skip to main content
1 of 2
roblogic
  • 4k
  • 18
  • 23

Fortran (GFortran), 35 bytes

read*,n;print*,sum([(j,j=1,n)]);end

Try it online! Construct inline anonymous array, sum, and print.

roblogic
  • 4k
  • 18
  • 23