next up previous contents index
suivant: Traduction Xcas monter: Activité précédent: le texte de l'exercice   Table des matières   Index

L'algorithme

On suppose que la fraction $ \tt\displaystyle \frac{NUM}{DENOM}\in]0;1[$.

L'algorithme s'écrit en langage non fonctionnel :
DENOM $ \rightarrow$A
NUM $ \rightarrow$B
Quotient(A, B) $ \rightarrow$Q
Reste(A, B) $ \rightarrow$R
tantque R $ \neq$0 faire
Q+1 $ \rightarrow$D
Afficher D
B-R $ \rightarrow$B
A*D $ \rightarrow$A
Quotient(A, B) $ \rightarrow$Q
Reste(A, B) $ \rightarrow$R
ftantque
Afficher Q


Documentation de giac écrite par Renée De Graeve