21 | | The function's name is 'square' and it takes an input parameter that is an integer and is referred to within the function as a. The function returns an integer that it computes by multiplying a by itself. |
| 21 | |
| 22 | * The function's name is 'square' (notice that function names are typically verbs because they ''do'' something). |
| 23 | * It takes an input parameter that is an integer and is referred to within the function as a. |
| 24 | * The function returns an integer that it computes by multiplying a by itself. |
| 25 | |
| 26 | You could use the square function as follows: |
| 27 | {{{ |
| 28 | int a = 9; |
| 29 | int b = square(a); |
| 30 | }}} |