Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
126979 邹子涵 奇偶位互换 C++ Compile Error 0 MS 0 KB 279 2025-07-23 08:46:28

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main() { char a[50],n,b[50],c[50]; cin>>n; for(int i=1;i<=n;i++) { cin>>a[i]; for(int j=0;j<50;j++) if(a[j]%2==0) { b[j+1]=a[j]; b[j]=a[j+1]; } } cout<<a[i]<<" "<<b[i]; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:17:10: error: 'i' was not declared in this scope
  cout<