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:)

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

Have you looked at the API of the String class?

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. ;-)

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

i also try not to invent one by myself..

This is what you are supposed to do.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.