Home
Features
_Multi DropDown
__Asp.net
__C
__C#
_Asp.net core
_Python
_sql server
Mega Menu
jquery
mvc
javascript
Home
About
Contact
Home
python
Write a program to find the gcd of two numbers.
Write a program to find the gcd of two numbers.
SRK CODE SOLUTIONS
January 22, 2020
Write a program to find the gcd of two numbers.
def gcd(x,y):
global ans
if x>y:
x,y=y,x
rem=y%x
if rem != 0:
gcd(rem,x)
else:
ans=x
return ans
a=int(input("Enter the number "))
b=int(input("Enter the number "))
print("The GCD is ")
print(gcd(a,b)
OutPut:-
Post a Comment
0 Comments
Labels
asp.net
c
c#
javascript
jquery
mvc
python
sql server
Tags
asp.net
c
c#
javascript
jquery
mvc
python
sql server
Contact Form
Name
Email
*
Message
*
Followers
Pages
Home
ABOUT-US
PRIVACY POLICY
CONTACT
Social Plugin
Popular Posts
Methods of primitives in javaScript
January 02, 2021
Hello, world
February 07, 2021
Shortcut Keys for Computer
November 21, 2020
Facebook
0 Comments