Use the above function in such a way that if both num1 & num2 are positive values, then task mentioned in logic 1 is to be used; otherwise task mentioned in logic 2 is to be used in the function swift programming code example
Example 1: how to set return type swift
func aFunction() -> <RETURN_TYPE> {
return <RETURN_TYPE>
}
//call function like this
aFunction()
Example 2: swift function in a variable
var pendingFunction: ((Double, Double) -> Double)