Function
factorial
exact ==> 12!
Source from the content-addressed store, hash-verified
| 126 | |
| 127 | // exact ==> 12! |
| 128 | uint32_t factorial(uint8_t n) |
| 129 | { |
| 130 | uint32_t f = 1; |
| 131 | while(n > 1) f *= (n--); |
| 132 | return f; |
| 133 | } |
| 134 | |
| 135 | |
| 136 | // exact ==> 20! |