ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 29 Mar 2013 07:23:51 +0100Euclidean algorithmhttps://ask.sagemath.org/question/9760/euclidean-algorithm/Hi,
I wrote these commands in sage to have Euclidean algorithm but I only get an error.. what is the problem of this algorithm?
r=a%b
print (a,b,r)
while r != 0:
a=b; b=r
r=a%b
print (a,b,r)
by the way how can I create a file named euclid.sage and save the above command in it?NedaFri, 29 Mar 2013 07:23:51 +0100https://ask.sagemath.org/question/9760/