[C] Stuck on scanf problem

Hello,

I want to first say I've been working on this homework problem longer than I'd like to admit. The answer seems so simple.

All I need is the program to output the user input separated into different lines. Every time it reaches a space it makes a new line. I can do all this. However the way I have written it is using a while loop, and I need it to ask the user if they would like to repeat the process after the computer has separated their input.

I need it to look something like this


INPUT: Hey how are you


OUTPUT: Hey

How

Are

You

Would you like to continue? [y/n]


Please help

Posted Feb 22, 2016, 5:21 AM UTC

35
Loading comments…