Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
89181 田苒彤 情报加密 C++ Compile Error 0 MS 0 KB 360 2024-08-23 10:35:23

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; char s[81]; int main() { cin.getline(s,81); for(int i=0;i<=n-1;i++){ if(s[i>=65&&s[i]<=90]){ if(s[i]=='Z'){ s[i]='A'; }else{ s[i]=s[i]+1 } }else if(s[i]>=97&&s[i]<=122){ if(s[i]=='z'){ s[i]='a'; }else{ s[i]+=1; } } } cout<<s; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:20: error: 'n' was not declared in this scope
     for(int i=0;i<=n-1;i++){
                    ^
Main.cc:12:4: error: expected ';' before '}' token
    }
    ^