Skip to content

Instantly share code, notes, and snippets.

@hauleth
Created February 27, 2011 18:34
Show Gist options
  • Save hauleth/846400 to your computer and use it in GitHub Desktop.
Save hauleth/846400 to your computer and use it in GitHub Desktop.
My proposition to the shortest code for print sum of arithmetic progression from 1 to a
main(a){while(scanf("%d",&a)>0)printf("%d",a*a+a>>1);}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment