This question already has an answer here:
- Spell out the Revu'a 28 answers
Given a string, make it into a triangle as shown below:
H He Hel Hell Hello Hello, Hello, Hello, w Hello, wo Hello, wor Hello, worl Hello, world Hello, world!
The first line contains the first character of the string. The following lines contain one more character on each line, until the full length of the original string is reached.
If you receive a one character string, just output it.
You will never receive an empty string.
- Standard loopholes apply, as usual
- This is code-golf, shortest solution wins.