Forezz

ДЗ 9 Н3

Jul 25th, 2019
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. def fact(i, fa):
  2. if i < n:
  3. a[i] = a[i - 1] + 1
  4. fa *=a[i]
  5. fact(i + 1, fa)
  6. else:
  7. print(fa)
  8.  
  9. n = 4
  10. a = [None] * n
  11. a[0] = 1
  12. fa = a[0]
  13. i = 1
  14. fact(i, fa)
Advertisement
Add Comment
Please, Sign In to add comment