--Originally published at Valeria CT
For this assignment I created the function find_banana(), which received a string, like Ken asked. In the main I opened the .txt file, converted everything to lower case and then called find_banana(). I used nested conditionals and nested loops. Here’s my code with everything explained, feel free to ask me if you have questions!
https://github.com/valeriact/tc1017/blob/master/wsq11.cpp
Resources:
- https://stackoverflow.com/questions/3867890/count-character-occurrences-in-a-string
- How To Think Like a Computer Scientist
-Valeria