Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
105815 李昊宇 13求7个数的平均数 C++ Compile Error 0 MS 0 KB 177 2025-01-14 14:36:16

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ int a,b=0; for(int i=1;i<=7;i++){ cin>>a; sum += a; } cout<<sum/7; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:9: error: 'sum' was not declared in this scope
         sum += a;
         ^
Main.cc:9:11: error: 'sum' was not declared in this scope
     cout<