A Collection of Code Snippets in as Many Programming Languages as Possible
This project is maintained by TheRenegadeCoder
Welcome to the Fizz Buzz in Tex page! Here, you'll find the source code for this program as well as a description of how the program works.
%&pdftex
\countdef\counter=1
\countdef\threecounter=2
\countdef\fivecounter=3
\counter=1
\threecounter=1
\fivecounter=1
\loop
\def\printnum{1}
\noindent
\ifnum \threecounter>2
Fizz%
\threecounter=0
\def\printnum{0}
\fi
\ifnum \fivecounter>4
Buzz%
\fivecounter=0
\def\printnum{0}
\fi
\ifnum\printnum=1
% print the counter variable
\the\counter%
\fi
\hfil \break
\advance \counter 1
\advance \threecounter 1
\advance \fivecounter 1
\ifnum \counter<101
\repeat
\end
Fizz Buzz in Tex was written by:
If you see anything you'd like to change or update, please consider contributing.
No 'How to Implement the Solution' section available. Please consider contributing.
No 'How to Run the Solution' section available. Please consider contributing.