flowchart and pseudocode of average - Search