求C++高手解答,跪谢

来源:百度知道 编辑:UC知道 时间:2024/06/23 05:25:13
Complete the following program by filling in the blanks
1、This program computes the average of all the values of an array named ‘list’. Assume that the count of the number of values is 100 or fewer.

#include <stdio.h>
#define ARRAY_SIZE 100
main( )
{
int list[ARRAY_SIZE];
int count = 0;
double total = 0.0;

while( EOF != scanf("%d", &list[ count ]))
{
total = ;

count = ;
}

printf("average = %lf \n", );
}

This program reads in an array of integers, reverses the elements of the array, and then displays the elements in their reversed order. Please complete the program.
#define MaxElement 5
#include <stdio.h>
void input(int a[],int n);
void reverse(int a[],int n);
void output(int a[],int n);
main()
{ int i,array[MaxElement];
input (arra

1。
total = total + list[count];
count = count + 1;
2.
for(i=0; i < n/2 ;i++)

{
temp = a[i];
a[i] = a[n - i];
a[n - i] = temp;

}

怎么题目还是英文的

第一题是填total=total+list[count];
count=count++;
后面太多了不看了

题目要自己写