I would make a string variable to hold the input. And then I would make 3 int variables to hold the vowels count, spaces count, and words count.
When you store a sentence like "the big bad wolf" into a string, the string acts like an array of characters. No, it IS an array of characters.
So if you cout arr[1], it would be "t". arr[2] would be "e". arr[3] would be a space.
That should really help...
When you say while-loop is required, I imagine you need it to run until the user wants it to stop...?
try to solve it for 1 scenario, and just put all that code into a while loop.
1 2 3
|
while (word != "1"){
//some code
}
|
....where
word
is the name of the string variable you made to store the user's input. If user entered 1, or some other value you want to represent quitting, then the program will end. Else, the program runs forever.
Edit: ...but I missed that <stdio.> part, lol...This solution wont help u much.