0

I would like to produce a something like this;

\documentclass{article}

\begin{document} \begin{tabular}{ccccccc} &&3&1&0&r&1\\hline 3&)&9&3&1& \end{tabular}

\end{document}

but with random numbers and looking a little nicer if possible

M. Logic
  • 4,214
Paul A
  • 1,055
  • 4
  • 14

1 Answers1

1

Use the longdivision package.

\documentclass{article}
\usepackage{longdivision}
\begin{document}
    \longdivision[stage=0]{931}{3}\quad
    \longdivision[stage=1]{931}{3}\quad
    \longdivision[stage=2]{931}{3}\quad
    \longdivision[stage=3]{931}{3}\quad
    \longdivision[stage=4]{931}{3}\quad
    \longdivision{931}{3}

\end{document}

enter image description here

M. Logic
  • 4,214
  • Thanks for the imput but i wanted the simple division without the long division at the bottom and just to give a remainder. But I like your stepwise way for long divison, I might use it. – Paul A May 19 '22 at 14:25
  • @PaulA See https://tex.stackexchange.com/a/210665/140814 – M. Logic May 19 '22 at 14:44
  • Thanks for all your help but I think I need to post the question again with more clarification. – Paul A May 19 '22 at 14:56