2 solutions
-
0
#include <bits/stdc++.h> using namespace std; const int N=90; char s[N]; int main() { cin.getline(s,N); int n=strlen(s); for(int i=0;i<=n;i++) { if(s[i]>='a'&&s[i]<='y'||s[i]>='A'&&s[i]<='Y') { s[i]=s[i]+1; } else if(s[i]=='z') { s[i]='a'; } else if(s[i]=='Z') { s[i]='A'; } } cout<<s; return 0; } -
0
#include<bits/stdc++.h> using namespace std; const int N=90; char s[N]; int main() { cin.getline(s,N); int n=strlen(s); for(int i=0;i<n;i++) { if(s[i]>='a'&&s[i]<='y'||s[i]>='A'&&s[i]<='Y') { s[i]=s[i]+1; } else if(s[i]=='z') { s[i]=s[i]-'z'+'a'; } else if(s[i]=='Z') { s[i]=s[i]-'Z'+'A'; } } cout<<s; return 0; }
- 1
Information
- ID
- 920
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 1
- Tags
- (None)
- # Submissions
- 86
- Accepted
- 35
- Uploaded By