anonymous
  • anonymous
how to write a factorial in C++
Computer Science
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
schrodinger
  • schrodinger
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
factorial !! explain more plz !!!
anonymous
  • anonymous
3 factorial = 3! = (3*2*1)
anonymous
  • anonymous
so say i want \[\frac{ x^3 }{ 3! }\]

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
is there an operator for that
anonymous
  • anonymous
or would i just type it out as (3*2*1)
anonymous
  • anonymous
I got it , I'll explain the algorithm : we can write a loop like this : for i is from x to 1 then : x! = x * (x-1)
anonymous
  • anonymous
ok
anonymous
  • anonymous
how would i write this
anonymous
  • anonymous
most efficiently
anonymous
  • anonymous
for example .. to calc 5! : for i= 1 to 5 do x!=x(x-1) is it clear ?
anonymous
  • anonymous
is that all you would type
anonymous
  • anonymous
what does i mean
anonymous
  • anonymous
I'm sorry I'll not write the code to you , I've told you the idea and U've to try ... good luck
anonymous
  • anonymous
ok thanks
eSpeX
  • eSpeX
@iop360 Try writing the steps out by hand, then look at the process you used and replicate it in your code.

Looking for something else?

Not the answer you are looking for? Search for more explanations.