Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
117801 | 赵梓渊 | 求三个数的最大值 | C++ | Compile Error | 0 MS | 0 KB | 264 | 2025-04-20 12:37:19 |
#include<bits/stdc++.h> using namespace std; int main() { int a, b, c; scanf("%d,%d", &a, &b); int d; if (a >=b) { d = a; } else { d=b; if (d>=c);{ e=d; { d = b;} else{ e=c; } cout << "max=" << e; return 0; }
Main.cc: In function 'int main()': Main.cc:13:3: error: 'e' was not declared in this scope e=d; ^ Main.cc:16:3: error: 'else' without a previous 'if' else{ ^ Main.cc:22:2: error: expected '}' at end of input } ^ Main.cc:22:2: error: expected '}' at end of input Main.cc:5:24: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d,%d", &a, &b); ^