--Originally published at The Talking Chalk
As seen in the example form Mastery Topics 2. You should only write the function outside the main fucntion and finally, in the main fucntion, write the name of the function while stablishing what are the parameters for it (making sure the type of each parameter is the adequate for the function. remember that int and doubles can be easily converted, but char cannot become an int or a double and viceversa).