LCM and HCF
LCM and HCF
#NAME=KAVYA THAKUR
#ROLL NO= 245583589
#course=bsc electronics
#date=9/10/2024
#AIM= lcm of two numbers in python
hcf=1
for i in range(2,a+1):
hcf=i
LCM=int((a*b)/(hcf))
OUTPUT
======= RESTART: C:/Users/HP/AppData/Local/Programs/Python/Python311/K.py
======
first number is 7
second number is 8
LCM of two number is 56
hcf=1
for i in range(2,a+1):
hcf=i
OUTPUT
======= RESTART: C:/Users/HP/AppData/Local/Programs/Python/Python311/K.py
======
first number is 16
second number is 14