Driver program to test above functions
public static void Main ( ) { int [ ] arr = { 1 , 2 , 3 , 4 , 5 } ; int n = arr . Length ; calculatePrefixSum ( arr , n ) ; Console . WriteLine ( findMean ( 1 , 2 ) ) ; Console . WriteLine ( findMean ( 1 , 3 ) ) ; Console . WriteLine ( findMean ( 1 , 4 ) ) ; } }