about | help | code help+videos | done | prefs |
factorial() -- given an int, num, return the factorial of num. The factorial of a number num is 1 * 2 * ... * num if num > 0. If num == 0, the factorial is 1. For example factorial(3) = 1 * 2 * 3 = 6. For this problem, you may assume num is not negative; factorial(0) → 1 factorial(1) → 1 factorial(2) → 2 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 150 Post-solution available
Copyright Nick Parlante 2017 - privacy