0

hello,
please tell me a function which can transform the first 100 consecutive number into a string?
i kept looking but i could'nt find one
thank you
all the best
dep:)

3
Contributors
6
Replies
7
Views
8 Years
Discussion Span
Last Post by javaAddict
0

Have you looked at the API of the String class?

Actually, I believe he's talking about the classic homework assignment of changing "1" to "one", "2" to "two", and so on and so forth. ;-)

0

Maybe because your homework assignment is to write one and not to copy/steal one.

i don't whant to steal/copy one, but i realy can't figure how it is supose to look like; and i also try not to invent one by myself..

thanks for your advice

0

Obviously you will need a for loop and some if statements (or a switch statement).
If you don't want 100 ifs try to create 2 arrays with elements:
"zero","one","two",..
and
"twenty","thirty",..

How many elements the arrays will have and how to use them is something for you.

I assume of course that you want what masijade has described, since you failed to explain your problem

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.