正在进行分工

正在进行分工

这是欧几里得算法求$\gcd(a,b)$的过程。有人能帮我画出除法的过程吗?谢谢大家欧几里得算法

答案1

对你起作用吗?

\documentclass[tikz,border=3.14159]{standalone}
\usetikzlibrary{positioning}

\begin{document}

    \tikzset{every node/.style={minimum width=25pt, minimum height=15pt}}
    
    \begin{tikzpicture}[node distance=0pt]
        
        \node (R1) at (0,0) {288};
        \foreach \d/\q/\r [count = \i] in
            {804/2/228,
            288/1/60,
            228/3/48,
            60/1/12,
            48/4/0}
            %
            {
            \pgfmathtruncatemacro{\j}{\i+1}         
            \node[below= of R\i] (Q\i) {\q};
            \node[left =of R\i] (D\i) {\d};     
            \node[below= of D\i] (R\j) {\r};
            \draw [shorten >=4pt]   (R\i.south west) -- (R\i.south east);
            \draw(R\i.north west) -- (Q\i.south west);
            }
        
    \end{tikzpicture}
\end{document}

O型阴蒂

相关内容