how to calculate average temperature of a year including the index by using arrays 2-dimensional
1
Expert's answer
2011-11-15T08:02:34-0500
create 2-dimensional array, where first - day in month and second - day in month and fill with its values. float ar[31][12]; then calculate average temperature: for (int i=0;i<31;i++){ for (int j=0;j<12;j++){ Sum=Sum+ar[i,j]; k++; } } average=Sum/k;
Comments
Leave a comment