A function returns a copy

Complete the previous lesson to unlock this one.

Back to the path

A function returns a copy

Level 3: Parameters. RETURN hands back a value. The caller’s variables are unchanged unless you also used BYREF — functions are how Paper 2 avoids that.

Write Max(A, B) so it returns the larger integer (either one if they are equal).

Read two integers and output Max of them.

Example: 3 then 5 → 5.