cout << "Enter a string: "; getline(cin, str); cout << "Enter a character: "; cin >> character;
int charCount = 0; for (int c = 0; c < str.size(); c++) if (str[c] == character) charCount++; cout << "There is " << charCount << " occurrences of this character in the given string." << endl; getch(); }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Thanks for your appreciation! If you really liked our service please press like-button beside answer field. Thank you!
best program sir...
Leave a comment