|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (10 bit)
|
c++ n factorial program
How would someone go about writing a program to compute the n factorial of a number? (n factorial is written as n!)
n! = n * (n-1) * (n-2) * .. * 1 for values of n greater than or equal to 1 0! = 1 for example, 5! = 5*4*3*2*1 = 120 thanks ^dan |
|
|
|
|
|
#2 |
|
Professional gadfly
|
I'll give it a shot:
PHP Code:
|
|
|
|
|
|
#3 |
|
Member (10 bit)
|
As always doctorgonzo, thank you very much for a very timely response, and of course, it works
![]() thanks again ^dan |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|