Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
88534 赵天瑜 05买水果 C++ Compile Error 0 MS 0 KB 358 2024-08-19 11:49:36

Tests(0/0):


Code:

#include<iostream> #include<cstdio> using namespace std; int main() { int banana; int apple; int grape; cin>>banana>>apple>>grape; double avg; avg=(banana+apple+grape)/3.0 printf("%.3lf元\n",avg); cout<<39/5<<" "<<39%5<<endl; cout<<39/8<<" "<<39%8<<endl; cout<<39/12<<" "<<39%12<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:12:5: error: expected ';' before 'printf'
     printf("%.3lf元\n",avg);
     ^