Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
105022 陈骏睿 12序列找规律 C++ Compile Error 0 MS 0 KB 422 2025-01-12 10:02:09

Tests(0/0):


Code:

#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,a=10000,j=10000,k; cin>>n; for( k=1;k<=(n-1)/2;K++){ i--; j-=2; } if(n%2) cout<<i<<endl; else cout<<j<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:10:23: error: 'K' was not declared in this scope
   for( k=1;k<=(n-1)/2;K++){
                       ^
Main.cc:11:7: error: 'i' was not declared in this scope
       i--;
       ^
Main.cc:15:10: error: 'i' was not declared in this scope
    cout<