Answer:
I don't understand need more information mate.
Explanation:
Novels about Harry Potter, a boy who learns on his eleventh birthday that he is the orphaned son of two powerful wizards and possesses unique magical powers of his own. He is summoned from his life as an unwanted child to become a student … More
Releas
Answer:
The function written in C++
int str(string word)
{
int count = 1;
for(int i =0; i<word.length();i++)
{
if(word[i] == ' ')
{
count++;
}
}
return count;
}
Explanation:
This line defines the function
int str(string word)
{
This line initializes count to 1
int count = 1;
This line iterates through the input string
for(int i =0; i<word.length();i++)
{
This line checks for blank space
if(word[i] == ' ')
{
Variable count is incremented to indicate a word count
count++;
}
}
return count;
}
<em>See attachment for full program</em>