On To Functions

--Originally published at Valeria CT

For this WSQ, I wrote a code that did practically the same thing that my WSQ01 did, but creating and a calling a different function for each mathematical operation. I had read about the creation of creation of function a long time ago, so I didn’t really remember how to do it. Luckily, I have an extra workspace on Cloud9 where I write short programs with the commands that I read about on the book that I feel the need to practice or that aren’t included on the WSQ’s that I’ve done so far, so I just went back to my practice code on functions and was able to do WSQ05 quickly.

My program doesn’t fit completely in the image above, so here’s a link to my code on GitHub: https://github.com/valeriact/tc1017/blob/master/wsq05.cpp

I haven’t set up completely my GitHub account nor have I installed Atom and Cygwin on my laptop because I need to update and reset my laptop first and I haven’t had the chance to do so; therefore all of my programs are on Cloud9. As soon as I have all of these set up, I’ll post an entry with the link to all of my WSQ’s.

The resource that I used for WSQ05 was the book How To Think Like a Computer Scientist. 

-Valeria