# Fizz Buzz in Tex

Published on 28 April 2022 (Updated: 02 February 2023)

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.

## Current Solution

%&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
\ifnum \counter<101
\repeat

\end


Fizz Buzz in Tex was written by:

• Christoph Böhmwalder

If you see anything you’d like to change or update, please consider contributing.

Note: The solution shown above is the current solution in the Sample Programs repository as of Sep 04 2018 11:11:25. The solution was first committed on Sep 04 2018 11:04:08. As a result, documentation below may be outdated.

## How to Implement the Solution

No ‘How to Implement the Solution’ section available. Please consider contributing.

## How to Run the Solution

No ‘How to Run the Solution’ section available. Please consider contributing.