Course

--Originally published at Programming course

I think I really learned this semester from my career but also from different subjects that everyone should know. Even though my new career doesn’t need this kind of programming, it helped me a lot to learn more about c++ and all the things we can do with it. I enjoyed the class very much and I am really thankful Ken ?


Bananas!

--Originally published at Programming course

So this assignment was longer than I expected but it was fun

here is what we had to do:

Write a function called find_bananas which receives a single parameter called filename (a string) and returns a positive integer which is the number of times the word (string) “banana”  (or “BANANA” ) is found in the file. The banana can be any case (‘BaNana’ or ‘BANANA’ or ‘banana’, etc) and they can be “stuck together” like “banAnaBANANA” (that counts as two). Create your own test file (plain text) to check your work.

And my codeWSQ11.png


WSQ09

--Originally published at Programming course

So this is what Ken told us to do:

So for this assignment I would like to see you create a function that receives as parameter the name of a file (this would be a string value like data.txt) and your function counts the number of lines and the number of characters in the file which it returns as a single value (but with two values). You will want to look at how to create/define and return a struct value from a function and how to open and read text files line by line

This is my code

WSQ09atom

And this is the help I used from a guy on Youtube: