%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Week 5 Answer Key
%
%@uthor Jake Hilty
%
%version 1-11-09
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Exercise1
% #1 = Title #2 = Author and #3 = Date
\font\seventeen=cmr17 at 17 truept
\font\twelve=cmr12 at 12 truept

\def\newHeading #1 by  #2 on #3.{
\line{\hfill\seventeen#1\hfill}
\line{\hfill\twelve#2\hfill}
\line{\hfill\twelve#3\hfill}
}

%\newHeading This Assignment by This Guy on This Date.
\newHeading Example by Jake Hilty on 1-11-09.

%If you did this without using the font size definitions and just used bold or something that is fine too, I think the font size differentiation looks correct.

%Exercise 2
\newcount\theNo
\newcount\chapNo

\theNo=0
\chapNo=0

\def\theorem #1\par{
\advance\theNo by 1
\medbreak 
\noindent{\bf Theorem \the\chapNo .\the\theNo \enspace}{\sl#1}\par\medbreak
}

\def\chapter #1.{
\advance\chapNo by 1
\line{\hfill\bf{Chapter \the\chapNo{}: }\rm#1\hfill}
\theNo=0
}

\chapter Showing How To Do Stuff.

\theorem An Example Theorem.\par

%Exercise 3
\newcount\recurct
\newcount\recurctr
	
\def\recur#1{
\recurct=#1
\ifnum\recurct=0
\noindent\the\recurctr
\fi

\ifnum\recurct>0 
	\advance\recurctr by \recurct
	\advance\recurct by -1
	\recur{\recurct}\fi
}

\recurctr=0
\noindent This will show the value if all the numbers from $1$ to $52$ are added together: \recur{52}

\end{document}