#WSQ08 On to functions.

FunctionAllTheThings

Hello people! I made a new program about functions, and yes, it’s the same program as the WSQ03, but now using Functions. What is a function on C++? “In C++, a function is a group of statements that is given a name, and which can be called from some point of the program. The most common syntax to define a function is:

type is the type of the value returned by the function.
name is the identifier by which the function can be called.
parameters (as many as needed) ”

(you can find more interesting information here: http://www.cplusplus.com/doc/tutorial/functions/)

And well, that page helps me a lot making my work easier, and as I sayed before, it was a remake of an old program so it was not difficult for me.

Here, the screenshots of my code using functions:

Haga click para ver el pase de diapositivas.

Here the program on Cygwin Terminal:

ofgg

And that’s all.

The functions help us to make our program clear and more easy to understand. We cant forget that to put the “RETURN” at the end of the function to make it workable.

Hope you like it!

Don’t forget to see my codes on GitHub. Click here to see them.

EdM.

 

CC BY-SA 4.0 #WSQ08 On to functions. by eduardomoralesg is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.