Re: Need
<bigmoviebuff@gmail.com> wrote:
> Hi guys does any of you guys have this c++ program .
> I need the program to input a string and accept a word number and
> print this pattern.
>
>
> Input) This is a message
> Input)4
>
> output) s
> ssa
> essag
> message
> essag
> ssa
> s
>
> and if it is a even word for example golden then the output is
>
>
> ld
> olde
> golden
> olde
> ld
There are two main parts to the question. Isolate a particular word and then
print that word in the funny pattern required. There are two kinds of
printing, depending on how many characters are in the word. Start by
writing a program that will get the two inputs from a user. isolate the
desired word and pass that word to a function *to be defined* (by you) that
will do the printing. For earrly testing, simply print the word in that
function.
|