Menu

[r376]: / XGCD.MPL  Maximize  Restore  History

Download this file

14 lines (10 with data), 210 Bytes

##LIBHDR

GCD(P,Q) Q ? GCD(Q,P\Q) : P

TEST(P,Q,R) WRITEF("GCD(%I4,%I4)=%I4 [%I4]*N",P,Q,GCD(P,Q),R)

.() [
  TEST(4,16,4);
  TEST(16,4,4);
  TEST(15,60,15);
  TEST(15,65,5);
  TEST(1052,52,4);
0]
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.