标签:
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 4475 Accepted Submission(s):
2349
1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 using namespace std; 5 int main() 6 { 7 int i,N; 8 //freopen("in.txt","r",stdin); 9 cin>>N; 10 getchar(); 11 for(i=1;i<=N;i++) 12 { 13 char a[51]; 14 int len,j; 15 gets(a); 16 len=strlen(a); 17 for(j=0;j<len;j++) 18 { 19 if(a[j]==‘Z‘) 20 a[j]=‘A‘; 21 else 22 a[j]++; 23 } 24 cout<<"String #"<<i<<endl<<a<<endl<<endl; 25 } 26 }
标签:
原文地址:http://www.cnblogs.com/a1225234/p/4617375.html