diff options
author | Norbert Preining <norbert@preining.info> | 2020-08-11 03:01:02 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-08-11 03:01:02 +0000 |
commit | c61c8a61c19de450cc1b0fe5010769090a42740b (patch) | |
tree | c5b3251600afccb5b21413c1b0b506efa5879788 /macros/latex/contrib/frpseudocode/frpseudocode-example.tex | |
parent | 37ce19e9251a5b38afadffc633acc6b03f03cc48 (diff) |
CTAN sync 202008110301
Diffstat (limited to 'macros/latex/contrib/frpseudocode/frpseudocode-example.tex')
-rw-r--r-- | macros/latex/contrib/frpseudocode/frpseudocode-example.tex | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/macros/latex/contrib/frpseudocode/frpseudocode-example.tex b/macros/latex/contrib/frpseudocode/frpseudocode-example.tex index de0de6846e..09e8a8c9fb 100644 --- a/macros/latex/contrib/frpseudocode/frpseudocode-example.tex +++ b/macros/latex/contrib/frpseudocode/frpseudocode-example.tex @@ -6,7 +6,7 @@ \begin{algorithm} \caption{Algorithme d'Euclide} \begin{algorithmic}[1] -\Procedure{Euclide}{$a,b$} +\Function{Euclide}{$a, b$} \Comment{PGCD de a et b} \State $r\gets a\bmod b$ \While{$r\not=0$}\Comment{Si r = 0, on a la réponse} @@ -15,6 +15,32 @@ \State $r\gets a\bmod b$ \EndWhile \State \Return $b$\Comment{Le PGCD est b} +\EndFunction +\end{algorithmic} +\end{algorithm} + +\begin{algorithm} +\caption{Démonstration boucle pour} +\begin{algorithmic}[1] +\Procedure{AfficheurMultiple}{$str$} +\Comment{Démo boucle pour} +\State $r\gets a\bmod b$ +\For{$i < 15$} +\State Afficher $str$ \Comment{On affiche la chaîne} +\EndFor +\EndProcedure +\end{algorithmic} +\end{algorithm} + +\begin{algorithm} +\caption{Démonstration boucle pour - 2} +\begin{algorithmic}[1] +\Procedure{AfficheurMultiple}{$str$} +\Comment{Démo boucle pour} +\State $r\gets a\bmod b$ +\ForFT{$i$}{$0$}{$15$} +\State Afficher $str$ \Comment{On affiche la chaîne} +\EndFor \EndProcedure \end{algorithmic} \end{algorithm} |