Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
147878 张蔚林 05买水果 C++ Compile Error 0 MS 0 KB 252 2026-02-08 21:33:17

Tests(0/0):


Code:

#include<iostream> #include<cstdio> using namespace std; int main() { double a=5,b=8,c=12,d=39; printf("%.3lf",(a+b+c)/3); printf("%lf %lf",d/a,d%a); printf("%lf %lf",d/b,d%b); printf("%lf %lf",d/c,d%c); return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:28: error: invalid operands of types 'double' and 'double' to binary 'operator%'
     printf("%lf %lf",d/a,d%a);
                            ^
Main.cc:9:28: error: invalid operands of types 'double' and 'double' to binary 'operator%'
     printf("%lf %lf",d/b,d%b);
                            ^
Main.cc:10:28: error: invalid operands of types 'double' and 'double' to binary 'operator%'
     printf("%lf %lf",d/c,d%c);  
                            ^