编程 10(programming 10).docVIP

  • 3
  • 0
  • 约5.03千字
  • 约 11页
  • 2017-09-15 发布于河南
  • 举报
编程 10(programming 10)

编程 10(programming 10) 91. write function fun, whose function is to calculate and output the sum of the square roots of the average of each of the two adjacent elements in a given array (length 9). For example, the 9 elements in a given array are 12, 34, 4, 23, 34, 45,, 18, 3, 11 in turn, and the output should be. #include stdio.h #include math.h Double fun (double x[9]) {int i; Double, avg=0.0, sum=0.0; For (i=0; i8; i++) { Avg= (x[i]+x[i+1]) /2; Sum+=sqrt (AVG); } Return sum; } 92. write a function that calculates and outputs the variance of a given number of 10 S= Reagan (1/10* (Xk-x) and 2

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档