C Source Code/Find the median and mean