SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Feb 2010
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Arrays with wwords problem

    i have a problem i want to output a given string in desending order also by taking out a letter each time.

    For example: The user gives a word - ARRAY
    It outputs: ARRAY
    RRAY
    RAY
    AY
    Y

    how do i get the user's word and make it output it this way. thanks.

  2. #2
    SitePoint Wizard silver trophy rushiku's Avatar
    Join Date
    Dec 2003
    Location
    A van down by the river
    Posts
    2,056
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Take a look at String.substring(int)

  3. #3
    SitePoint Member
    Join Date
    Feb 2010
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    okay i can see how this works but how would i put it in a loop that i don't have to write a substring code for every letter.

  4. #4
    SitePoint Member
    Join Date
    Feb 2010
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nevermind i got it...thanks tho your help really helped


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •