Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/FizzBuzz/LaTeX/fizzbuzz.tex
Normal file
19
Task/FizzBuzz/LaTeX/fizzbuzz.tex
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
\documentclass{minimal}
|
||||
\usepackage{ifthen}
|
||||
\usepackage{intcalc}
|
||||
\newcounter{mycount}
|
||||
\newboolean{fizzOrBuzz}
|
||||
\newcommand\fizzBuzz[1]{%
|
||||
\setcounter{mycount}{1}\whiledo{\value{mycount}<#1}
|
||||
{
|
||||
\setboolean{fizzOrBuzz}{false}
|
||||
\ifthenelse{\equal{\intcalcMod{\themycount}{3}}{0}}{\setboolean{fizzOrBuzz}{true}Fizz}{}
|
||||
\ifthenelse{\equal{\intcalcMod{\themycount}{5}}{0}}{\setboolean{fizzOrBuzz}{true}Buzz}{}
|
||||
\ifthenelse{\boolean{fizzOrBuzz}}{}{\themycount}
|
||||
\stepcounter{mycount}
|
||||
\\
|
||||
}
|
||||
}
|
||||
\begin{document}
|
||||
\fizzBuzz{101}
|
||||
\end{document}
|
||||
Loading…
Add table
Add a link
Reference in a new issue