Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
136379 严鑫亮 财务管理 C++ Compile Error 0 MS 0 KB 248 2025-11-12 19:29:05

Tests(0/0):


Code:

#include <iostream> #include <cstdio> using namespace std; int main() { double sum = 0; for(int i = 0; i < 12; i++) { double money; cin >> money; sum+=money; } printf("0.2lf%s",sum/12,"$") }


Run Info:

Main.cc: In function 'int main()':
Main.cc:14:32: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'double' [-Wformat=]
     printf("0.2lf%s",sum/12,"$")
                                ^
Main.cc:14:32: warning: too many arguments for format [-Wformat-extra-args]
Main.cc:17:1: error: expected ';' before '}' token
 }
 ^