Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
125067 王金檐 加密的病历单 C++ Compile Error 0 MS 0 KB 518 2025-07-13 11:34:37

Tests(0/0):


Code:

#include <iostream> #include <cstring> using namespace std; char a[50]; char s[50]; int main(){ cin>>a; int n=strlen(a); for(int i=0;i<n;i++){ if(a[i]>='a'&&a[i]<='z'){ a[i]=char (a[i]-32); }else{ a[i]=char (a[i]+32); } } int k=0; for(int i=n-1;i>=0;i--){ s[k]=a[i]; k++; } for(int i=0;i<n;i++){ if(s[i]>='a'||s[i]<'x'){ s[i]=char (s[i]+3); }else if(s[i]>='A'||s[i]<x){ s[i]=char (s[i]+3); }else{ s[i]=char (s[i]-26); } } cout<<s; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:24:28: error: 'x' was not declared in this scope
   }else if(s[i]>='A'||s[i]