Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
cccc
#include <iostream> #include <string> using namespace std; int main() { string str; cin >> str; for(int i = 0 ; i < str.length(); i++){ if(str[i] == 'Z') str[i] = 'A'; else if(str[i] == 'z') str[i] ='a'; else if(str[i] == 'Я') str[i] ='A'; else if(str[i] == 'я') str[i] ='a'; else str[i]++; } for(int i=0; i<str.length(); i++) { str[i]+=i%4; if(str[i]>'z') str[i]='a'+str[i]-'z'; } for(int i=0; i<str.length(); i++) { str[i]=(str[i]-'a')*2+'a'; if(str[i]>'z') str[i]='a'+str[i]-'z'; } cout << str; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
passing by reference vs passing by value
inheritance test
ADVENTURE CODE CSCI 40
D. Traveling Graph
typedef char*
next greater palindrome
Type erasure
string-Orderly words
Lazy String Tokenizer Class
多态
stackse - search stackoverflow differently
Please log in to post a comment.