Greatest Common Divisor
By Daniel Wedge
For Casio fx-9700 calculators (could work on others)
*** MORE GAMES AND PROGRAMS FOR CASIO CALCULATORS AT ***
******** http://www.student.uwa.edu.au/~wedgey *********
Calculates the largest integer that divides the two given
integers. Uses the Euclidean algorithm.
SYMBOLS USED:
-> assign key (the arrow below the cos key)
=> and/then (in program, jump, F1)
@ display (the triangle in program)
/ divide
!= not equal to
Size: 121 bytes
'GCD
"FIND THE GCD OF"
"A AND B WITH A>B"
"A"?->A
"B"?->B
B->E
Lbl 0
Int (A/B)->C
A-CB->D
B->A
D->B
D!=0 => D->E
D!=0 => Goto 0
"GCD="
E@
"FINISHED"