Skip to content

Instantly share code, notes, and snippets.

@rizwansoaib
Created March 25, 2018 03:19
Show Gist options
  • Save rizwansoaib/cd0f404da3b7171b962f533383344656 to your computer and use it in GitHub Desktop.
Save rizwansoaib/cd0f404da3b7171b962f533383344656 to your computer and use it in GitHub Desktop.
def mul(a,b):
if(b>=1):
return a+mul(a,b-1)
else:
return 0
a=int(input("Enter First Digit:\n"))
b=int(input("Enter Second Digit:\n"))
print("{0}*{1}={2}".format(a,b,mul(a,b)))
@rizwansoaib
Copy link
Author

multiplication using recursion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment