2015-02-20 00:35:01 -05:00
|
|
|
A function is a body of code that returns a value.
|
2016-12-05 22:15:40 +01:00
|
|
|
|
2015-02-20 00:35:01 -05:00
|
|
|
The value returned may depend on arguments provided to the function.
|
2013-04-10 21:29:02 -07:00
|
|
|
|
2016-12-05 22:15:40 +01:00
|
|
|
|
|
|
|
|
;Task:
|
2013-04-10 21:29:02 -07:00
|
|
|
Write a definition of a function called "multiply" that takes two arguments and returns their product.
|
2016-12-05 22:15:40 +01:00
|
|
|
|
2013-04-10 21:29:02 -07:00
|
|
|
(Argument types should be chosen so as not to distract from showing how functions are created and values returned).
|
|
|
|
|
|
2016-12-05 22:15:40 +01:00
|
|
|
|
|
|
|
|
;Related task:
|
|
|
|
|
* [[Function prototype]]
|
|
|
|
|
<br><br>
|