-1

I want to write a program that take string numeric as input(eg,one,two,three etc) and output will be sorted by ascending order or descending order of that string and show it in string as given in input.

Example:

Input:five,two,seven,ten,four

Output:two,four,five,seven,ten

Arbab Khan
  • 15
  • 2

1 Answers1

1

Interesting problem... You could use that Package: Numbers_Words It has til now only the function "toWords", but should easily be extended with toNumbers. Just downloaded it an looked into the code, don't look to complicated.

PanicMan
  • 244
  • 2
  • 4