FANDOM



:gcd(value,value)

Returns the greatest common divisor of two numbers. That is, the smallest number that is a whole-number factor of both numbers.

LocationEdit

  • MATH
  • NUM
  • 9:gcd(

ExampleEdit

:ClrDraw
:Input "NUMERATOR",N
:Input "DENOMINATOR",D
:Output(1,1,N,"/",D)
:N/gcd(N,D)→N
:D/gcd(N,D)→D
:Output(2,1,"SIMPLIFIED:")
:Output(3,1,N,"/",D)

This gets a fraction. It prints the fraction. Then it simplifies the fraction by dividing both numbers by the gcd. Then it prints the fraction again.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.