We’re now going to have lots of fun with numbers!

Numbers

“Magic numbers” by Emily Harrison. Link: https://www.flickr.com/photos/eeekkgirl/3614817763/

This is the preamble for functions, so it is a very important task to know what we’re doing here for future works. The code is shown here below, where we defining the variables before the main function, while making the calculations in the main function.

WSQ3

Then we compile it on Cygwin to check for any mistakes… since it doesn’t have any, we give the program the values 13 and 5, just for fun.

WSQ3 cyg

And run it to see how well it does its job!

WSQ3 cygrun

CC BY 4.0 WSQ03 by Alan S. Olalla is licensed under a Creative Commons Attribution 4.0 International License.