IBM Interview Question

Average of two numbers by function