Jan-08-2020, 10:31 AM
n is 1, carrying over 1, this is base case
n is 2, carrying over 2 How do we bring the top 1 here such that we can print 2 X 1 = 2
n is 3, carrying over 6 How do we bring the top 2 here such that we can print 3 X 2 = 6
n is 4, carrying over 24 same thing
n is 5, carrying over 120
I was told to save it in an intermediary variable. How to do that?
Thanks.
n is 2, carrying over 2 How do we bring the top 1 here such that we can print 2 X 1 = 2
n is 3, carrying over 6 How do we bring the top 2 here such that we can print 3 X 2 = 6
n is 4, carrying over 24 same thing
n is 5, carrying over 120
I was told to save it in an intermediary variable. How to do that?
Thanks.