input two numbers and print Gcd (hcf) and lcm of it
Answers
Answered by
0
Method 1
Method 2
HCF of 34 and 56
Factors of 34 - 1,2,17,34
Factors of 56- 1,2,4,7,8,14,28,56
Common Factors - 1, 2,
HCF -2
LCM- 952
Hope it will help you please like
Thanks
Attachments:
Answered by
0
Answer:
ITS A PYTHON PROGAM..
Explanation:
#to find lcm and gcd
a=int(input("enter the first number"))
b=int(input("enter the first number"))
prod=a*b
while a!=b:
if a>b:
a=a-b
else:
b=b-a
gcd=a
lcm=prod/gcd
print("GCD=",gcd)
print("LCM=",lcm)
#hope it helps you
please mark brainliest
Similar questions