Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
106268 | 胡海峰老师 | 求最大值 | C++ | Compile Error | 0 MS | 0 KB | 301 | 2025-01-15 20:37:42 |
#include <iostream> using namespace std; int main(){ int i; i =1; int maxn=0; while(i<=10) { //做任务 cin>>x; if ( x> maxn) maxn =x ; i++; //跳到下一次 } cout<< maxn; return 0; }
Main.cc: In function 'int main()': Main.cc:10:14: error: 'x' was not declared in this scope cin>>x; ^