IBM interview question

Average of two numbers by function