Created
March 25, 2018 03:19
-
-
Save rizwansoaib/cd0f404da3b7171b962f533383344656 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
multiplication using recursion