Skip to content

Commit e51a67e

Browse files
authored
Create Python greatest common factor
1 parent 717b2c2 commit e51a67e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Python greatest common factor

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
a = int (input('a = '))
2+
b = int (input('b = '))
3+
r = a % b
4+
while r != 0:
5+
a = b
6+
b = r
7+
r = a % b
8+
print ('\nggt =', b)

0 commit comments

Comments
 (0)