Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
100248 谭思宸 12序列找规律 C++ Compile Error 0 MS 0 KB 314 2024-12-07 12:00:36

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ int n,i;=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:4:17: error: expected primary-expression before '=' token
         int n,i;=10000,j=10000,k;
                 ^
Main.cc:4:24: error: 'j' was not declared in this scope
         int n,i;=10000,j=10000,k;
                        ^
Main.cc:4:32: error: 'k' was not declared in this scope
         int n,i;=10000,j=10000,k;
                                ^