A function is a body of code that returns a value.

The value returned may depend on arguments provided to the function.



Task

Write a definition of a function called "multiply" that takes two arguments and returns their product.

(Argument types should be chosen so as not to distract from showing how functions are created and values returned).



Related task

   Function prototype


main(){
    print(multiply(1,2));
    print(multiply2(1,2));
    print(multiply3(1,2));
}
 
// the following definitions are equivalent
// arrow syntax without type annotations
multiply(num1, num2) => num1 * num2;
 
// arrow syntax with type annotations
int multiply2(int num1, int num2) => num1 * num2;
 
// c style with curly braces
int multiply3(int num1, int num2){
    return num1 * num2;
}
 