mmayoub

רקורסיה, פלט של הקוד

Nov 25th, 2021 (edited)
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. start factorial with 7
  2. start factorial with 6
  3. start factorial with 5
  4. start factorial with 4
  5. start factorial with 3
  6. start factorial with 2
  7. start factorial with 1
  8. start factorial with 0
  9. factorial(0)=1
  10. factorial(1)=1
  11. factorial(2)=2
  12. factorial(3)=6
  13. factorial(4)=24
  14. factorial(5)=120
  15. factorial(6)=720
  16. factorial(7)=5040
  17. * * * * * * * f a c t o r i a l * * * * * * *
  18. final result: factorial(7) = 5040
  19.  
  20.  
  21. * * * * * * * * h a s * * * * * * * *
  22. start searching in 3219786 for 2
  23. start searching in 321978 for 2
  24. start searching in 32197 for 2
  25. start searching in 3219 for 2
  26. start searching in 321 for 2
  27. start searching in 32 for 2
  28. 32 starts with the digit 2
  29. 3219786 has a digit equals to 2
  30.  
Add Comment
Please, Sign In to add comment