Last active
August 15, 2019 18:38
-
-
Save dginev/cfe8f5ceb82b1e2c5558c05a4355d0ed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\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