On to functions:

For of my course, I learned how to declare a few basic arithmetic functions.

 

This is how they look like:

 

 

After declaring functions, you just need to call them in the main section and write the arguments, which are the two variables you want the function to compute.

At the end, the program looks like this:

 

 

Cheers.

 

CC BY 4.0 On to functions: by Rodrigo Hernández is licensed under a Creative Commons Attribution 4.0 International License.

Comments are closed.