Small program to find the greatest common divisor on the fx-5800P.
?M ?N M→S N<M N<M⇒N→S For 1→F To S If Frac(S÷F)=0 Then Cls Locate 1,1,S÷F If Frac(N÷(S÷F))=0 And Frac(M÷(S÷F))=0 Then Break IfEnd IfEnd Next Cls "GCD":S÷F
Edited by Tritonio, 08 September 2019 - 06:38 PM.