Printing input word within ascii triangle
So yeah, major n00b question.
I am tasked with creating ascii shapes. Lame, been there done that. But what I'm having issues with, is that the user is supposed to provide along with the shape and 'size' of the shape, a word, and a specific line of the shape to place that word, while maintaining the shape of whats whats been drawn. IE the user says they want "cat" on line 3 of a triangle so,
c a t
* * * *
* * * * *
now, just hard coding the user answer, to that line is not hard. I want to maintain the integrity of the shape. So if they would have said line 5
I'm thinking along the lines that I will need to parse out the string input into a char value array. But how do I reproduce the format of my shape on that line?
* * *
* * * *
* c a t *
Re: Printing input word within ascii triangle
What have you done so far? The asterisk/triangle question alone has been asked much on this forum, so a quick search of the forums will lead you along those lines (as well as visiting the similar threads list at the bottom of the page)