Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

iop360

how to write a factorial in C++

  • one year ago
  • one year ago

  • This Question is Open
  1. ammar-93
    Best Response
    You've already chosen the best response.
    Medals 0

    factorial !! explain more plz !!!

    • one year ago
  2. iop360
    Best Response
    You've already chosen the best response.
    Medals 0

    3 factorial = 3! = (3*2*1)

    • one year ago
  3. iop360
    Best Response
    You've already chosen the best response.
    Medals 0

    so say i want \[\frac{ x^3 }{ 3! }\]

    • one year ago
  4. iop360
    Best Response
    You've already chosen the best response.
    Medals 0

    is there an operator for that

    • one year ago
  5. iop360
    Best Response
    You've already chosen the best response.
    Medals 0

    or would i just type it out as (3*2*1)

    • one year ago
  6. ammar-93
    Best Response
    You've already chosen the best response.
    Medals 0

    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)

    • one year ago
  7. iop360
    Best Response
    You've already chosen the best response.
    Medals 0

    ok

    • one year ago
  8. iop360
    Best Response
    You've already chosen the best response.
    Medals 0

    how would i write this

    • one year ago
  9. iop360
    Best Response
    You've already chosen the best response.
    Medals 0

    most efficiently

    • one year ago
  10. ammar-93
    Best Response
    You've already chosen the best response.
    Medals 0

    for example .. to calc 5! : for i= 1 to 5 do x!=x(x-1) is it clear ?

    • one year ago
  11. iop360
    Best Response
    You've already chosen the best response.
    Medals 0

    is that all you would type

    • one year ago
  12. iop360
    Best Response
    You've already chosen the best response.
    Medals 0

    what does i mean

    • one year ago
  13. ammar-93
    Best Response
    You've already chosen the best response.
    Medals 0

    I'm sorry I'll not write the code to you , I've told you the idea and U've to try ... good luck

    • one year ago
  14. iop360
    Best Response
    You've already chosen the best response.
    Medals 0

    ok thanks

    • one year ago
  15. eSpeX
    Best Response
    You've already chosen the best response.
    Medals 0

    @iop360 Try writing the steps out by hand, then look at the process you used and replicate it in your code.

    • one year ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.