Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. permutations and combination

permutations and combination

Scheduled Pinned Locked Moved C / C++ / MFC
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RockyJames
    wrote on last edited by
    #1

    hi, I have ,say N=4 and r=3, i want to display all combinations of Ncr..... i.e 123 234 341 421...etc There should not any repition like 123..321..231..etc..it should display only one ....... thanks before.. James -- modified at 13:48 Saturday 18th February, 2006

    T K 2 Replies Last reply
    0
    • R RockyJames

      hi, I have ,say N=4 and r=3, i want to display all combinations of Ncr..... i.e 123 234 341 421...etc There should not any repition like 123..321..231..etc..it should display only one ....... thanks before.. James -- modified at 13:48 Saturday 18th February, 2006

      T Offline
      T Offline
      theprinc
      wrote on last edited by
      #2

      Whats the question?

      R 1 Reply Last reply
      0
      • T theprinc

        Whats the question?

        R Offline
        R Offline
        RockyJames
        wrote on last edited by
        #3

        To print All the combinations of N elements with r combinations....... -- modified at 14:24 Saturday 18th February, 2006

        1 Reply Last reply
        0
        • R RockyJames

          hi, I have ,say N=4 and r=3, i want to display all combinations of Ncr..... i.e 123 234 341 421...etc There should not any repition like 123..321..231..etc..it should display only one ....... thanks before.. James -- modified at 13:48 Saturday 18th February, 2006

          K Offline
          K Offline
          Koushik Biswas
          wrote on last edited by
          #4

          http://www.codeproject.com/cpp/CombC.asp[^] First google, then "codeproject" then ask in a forum. My google search string was "C++ choose r from n combination algorithm" - and the 1st hit was the above link. Searching on google is an art - and forums are there when that art fails (which it does sometimes). Koushik Biswas

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups