求助!只有21分
查看原帖
求助!只有21分
977778
__Harry_Haiyun__楼主2023/5/8 22:54

求助!只有21分!(代码如下):

#include <stdio.h>
using namespace std;
int main()
{
	int N,K;
	scanf("%d %d",&N,&K);
	double temp;
	double sum = 0;
	for (int i = 0; i < N; i++) scanf("%lf",&temp); sum += temp;
	sum /= K;
	printf("%.2lf",sum);
	return 0;
}
2023/5/8 22:54
加载中...