Skip to content

Instantly share code, notes, and snippets.

@dginev
Last active August 15, 2019 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dginev/cfe8f5ceb82b1e2c5558c05a4355d0ed to your computer and use it in GitHub Desktop.
Save dginev/cfe8f5ceb82b1e2c5558c05a4355d0ed to your computer and use it in GitHub Desktop.
\newcount\index
\newcount\sum
\def\esum#1{
\index=#1
\sum=0
\loop
\advance\sum by \index
\ifnum\index>2
\advance\index by -2
\repeat
\the\sum}
\esum{100}\bye
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment