fork download
  1. # algorytm euklidesa
  2. a=7
  3. b=9
  4. def nwd(a,b):
  5. while a!=b:
  6. if a>b:
  7. a=a-b
  8. elif a<b:
  9. b=b-a
  10. return a
  11. print(nwd(a,b))
  12. print(a,'' '' '',a/nwd(a,b))
  13. print('-','=','-')
  14. print(b,'' '' '',b/nwd(a,b))
Success #stdin #stdout 0.03s 9624KB
stdin
Standard input is empty
stdout
1
7  7.0
- = -
9  9.0