A Factorial And Combination Programming

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • leifmale
    New Member
    • Feb 2008
    • 1

    A Factorial And Combination Programming

    A Factorial And Combination Programming
    --------------------------------------------------------------------------------

    GUYS GOOD AFTERNOON,,

    PLS help me in my project it goes:
    Write a program that accepts 2 values n and r and display the value of
    a.)P(n,r)
    b.)C(n,r)
    it is about in permutation and combination.
    it will be past today please help me guys have mercy on me..

    --------------------------------------------------------------------------------
  • gpraghuram
    Recognized Expert Top Contributor
    • Mar 2007
    • 1275

    #2
    Originally posted by leifmale
    A Factorial And Combination Programming
    --------------------------------------------------------------------------------

    GUYS GOOD AFTERNOON,,

    PLS help me in my project it goes:
    Write a program that accepts 2 values n and r and display the value of
    a.)P(n,r)
    b.)C(n,r)
    it is about in permutation and combination.
    it will be past today please help me guys have mercy on me..

    --------------------------------------------------------------------------------
    Please dont double post

    Raghu

    Comment

    • Meetee
      Recognized Expert Contributor
      • Dec 2006
      • 928

      #3
      Originally posted by leifmale
      A Factorial And Combination Programming
      --------------------------------------------------------------------------------

      GUYS GOOD AFTERNOON,,

      PLS help me in my project it goes:
      Write a program that accepts 2 values n and r and display the value of
      a.)P(n,r)
      b.)C(n,r)
      it is about in permutation and combination.
      it will be past today please help me guys have mercy on me..

      --------------------------------------------------------------------------------
      This is a mathematical calculation for n!/r!*(n-r)! and n!/(n-r)! For factorial, you need to have a loop in which multiplication will be done. Please post your efforts and must read posting guidelines.

      Regards

      Comment

      • hsriat
        Recognized Expert Top Contributor
        • Jan 2008
        • 1653

        #4
        Aww... I'm not too good in C++, else I could have helped you.
        See this if it helps you somewhat in designing a logic.

        Comment

        Working...