From 532b86ee7e06d34ef3420bb344ea926ba1506cdf Mon Sep 17 00:00:00 2001 From: Kunal Kumar Gupta <42343749+kunal817@users.noreply.github.com> Date: Sun, 25 Oct 2020 00:55:42 +0530 Subject: [PATCH 1/2] Create 22.py --- Python/22.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Python/22.py diff --git a/Python/22.py b/Python/22.py new file mode 100644 index 0000000..6ffb56c --- /dev/null +++ b/Python/22.py @@ -0,0 +1,10 @@ +def GCD(a,b): + if b==0: + return a + r=a%b + return GCD(b,r) +numbers=input() +nums=numbers.split() +a=int(nums[0]) +b=int(nums[1]) +print((a*b)//GCD(a,b)) From 2a65cf2bfad54a10f121d4b5be6fd45f4775d267 Mon Sep 17 00:00:00 2001 From: Kunal Kumar Gupta <42343749+kunal817@users.noreply.github.com> Date: Sun, 25 Oct 2020 15:15:21 +0530 Subject: [PATCH 2/2] Update 22.py --- Python/22.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Python/22.py b/Python/22.py index 6ffb56c..9b3b4c6 100644 --- a/Python/22.py +++ b/Python/22.py @@ -4,7 +4,7 @@ def GCD(a,b): r=a%b return GCD(b,r) numbers=input() -nums=numbers.split() +nums=numbers.split("Enter two numbers:") a=int(nums[0]) b=int(nums[1]) -print((a*b)//GCD(a,b)) +print("lcm of two numbers:",(a*b)//GCD(a,b))