题解 | #密码翻译#
密码翻译
https://www.nowcoder.com/practice/136de4a719954361a8e9e41c8c4ad855
#include <stdio.h> int main() { char m[82]; int i=0; gets(m); while (m[i]!='\0') { if(m[i]<='y'&&m[i]>='a'){ m[i]++; } else if (m[i]<='Y'&&m[i]>='A') { m[i]++; } else if(m[i]=='Z'){ m[i]='A'; } else if(m[i]=='z'){ m[i]='a'; } //else{ // printf("WRONG!\n"); // } i++; } printf("%s\n",m); }