0
Please help with if...return..else
using an if.. else .. end structure, create a function named customfunc of two scalar arguments x and y, which does the following: if x is greater than y, return x*y if x is less that y, return (y-x)x if x == y (remember, when we compare, we use == instead of =) return 0 customfunc (x+101) = x; E (y+101) = y; E (y+101) = customfunc (x+101); If x>y Return x*y; Elseif x<y Return (y-x)*x; Elseif x==y Return 0; end
1 Antwort
0
Notice: Do not use return more than once.