diff --git a/factor.py b/factor.py index 09819cf..4939b0d 100644 --- a/factor.py +++ b/factor.py @@ -1,10 +1,12 @@ + x=int(input("Give the x value :")) y=int(input("Give the y value :")) -a=min(x,y) -factor=[] +a= min(x,y) +factors=[] for i in range(1,a+1): if (x%i==0) and (y%i==0): - factor.append(i) + factors.append(i) + +print("common factors:"," ".join(map(str,factor))) -print(" ".join(map(str,factor))) - \ No newline at end of file +