Answer to Question #86593 in C++ for Abi Alvarez

Question #86593
I am currently working on a program set and I was wondering if you could answer my question.
I have come across std::string letterOccurence(); and
I have done my code to let the program run; this is the code below: string str;
//cin>>str;
getline(cin,str);
char checkCharacter = 'a';
int count = 0;

for (int i = 0; i < str.size(); i++)
{
if (str[i] == checkCharacter)
{
++ count;
}
++checkCharacter +1;
}

cout << "Number of " << checkCharacter << " = " << count;

return 0;
Apparently I should use a 2 dimensional array but I am stuck. Please help!
1
Expert's answer
2019-03-19T00:26:56-0400
Dear Abi Alvarez, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS