Help Please!!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • butterfly21
    New Member
    • Oct 2006
    • 7

    Help Please!!

    Does anyone know how to go about writting a program to compute the following sequence...

    23
    1213
    211213
    312213
    212223
    312213
    212223......

    it counts up how many of each number are in the previous line, it shouldnt be to difficult, if the first digit equals 1 count one, if second equals 1 count two 1s...until all the 1s are counted then does 2s....

    I would really appreciate a point in the right direction!

    thanks very much!
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    This is string manipulation.

    You have a string
    You count the characters
    You create the new string
    You output the string
    You start again

    You will have to decided how many iterations you are going to go through because there is no stop condition.

    You will need a loop.

    Comment

    Working...