| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 105563 | 陈骏睿 | 13求n加到m的和 | C++ | Compile Error | 0 MS | 0 KB | 353 | 2025-01-14 09:19:11 |
#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,m,x=0; cin>>n>>m; for(n;n<=m;n++){ x+=n; } cout<<x<<endl; return 0; }
Main.cc:8:3: error: expected initializer before 'int'
int n,m,x=0;
^
Main.cc:9:3: error: 'cin' does not name a type
cin>>n>>m;
^
Main.cc:10:3: error: expected unqualified-id before 'for'
for(n;n<=m;n++){
^
Main.cc:10:9: error: 'n' does not name a type
for(n;n<=m;n++){
^
Main.cc:10:14: error: 'n' does not name a type
for(n;n<=m;n++){
^
Main.cc:13:3: error: 'cout' does not name a type
cout<