Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
101768 | 房知谦 | [在线测评解答教程] 求和 | C++ | Compile Error | 0 MS | 0 KB | 510 | 2024-12-18 19:00:42 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n; cin>>n; int a[100 ]; int y; for(int i=0;i<10000;i++){ cin>>n; if(n="eof"){ break; } n=a[i]; } for(int o=0;o<i;o++){ y=y+a[o]; } cout<<i; return 0; }
Main.cc: In function 'int main()': Main.cc:14:13: error: invalid conversion from 'const char*' to 'int' [-fpermissive] if(n="eof"){ ^ Main.cc:14:19: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if(n="eof"){ ^ Main.cc:19:19: error: 'i' was not declared in this scope for(int o=0;o