Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Digits in Array

 
Maya Naga
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ranches...

i need a solution for the below problem...



here i try to save the entered number into an array..
for example: if user enters 1234, the result will be 4321and we can search for any number..
i try to save these 1234 into array as individual numbers...but am getting result as
a[0]=4
a[1]=3
a[2]=2
a[3]=1

is there any solution for getting result as
a[0]=1
a[1]=2
a[2]=3
a[3]=4
 
Ireneusz Kordal
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Maya Naga
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks.. its works fine..
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please, please don't provide direct answers like that--our goal is to help people learn how to learn.

It's obviously too late this time, which is too bad.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic