Help me!!!!!!!!!!!!!!!!!!!!!!!!!!!
  • 板块B2055 均值
  • 楼主Liao_Zongze
  • 当前回复5
  • 已保存回复5
  • 发布时间2024/11/29 19:37
  • 上次更新2024/11/29 21:13:47
查看原帖
Help me!!!!!!!!!!!!!!!!!!!!!!!!!!!
1556684
Liao_Zongze楼主2024/11/29 19:37

废话不多,直接上花红柳绿代码......

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a,b=0,c=0;
    double f,d;
    cin>>a;
    for(int b=0;b<a;b++){
        cin>>d;
        c+=d;
    }
    f=double(c)/a;
    printf("%.4f",f);
    return 0;
}
2024/11/29 19:37
加载中...