Hi guys, basically, I don't know anything about programming, only the basics, and our professor is trying to make us this program which is a string, that would count the vowels, spaces, and words. If the vowels exceed five, it will reverse the sentence. I'm done with all of this except the COUNT OF WORDS.
Basically, the thing I did was to initialize word=1 and add one everything a space is detected. What if the user entered 2 spaces between two words, it will count 3 words instead of two. Anyone have a more good solution for this?