Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
90933 石水生 04计算平均分 C++ Compile Error 0 MS 0 KB 133 2024-09-20 13:46:39

Tests(0/0):


Code:

#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; double c=(a+b+c)/3; printf("%.2f",c); }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:9: error: conflicting declaration 'double c'
  double c=(a+b+c)/3;
         ^
Main.cc:4:10: note: previous declaration as 'int c'
  int a,b,c;
          ^
Main.cc:7:17: warning: format '%f' expects argument of type 'double', but argument 2 has type 'int' [-Wformat=]
  printf("%.2f",c);
                 ^