Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
求指教#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { int i; char a[201],b[100]; while(scanf("%s",b)&&b[0]!='E') { gets(a); for(i=0;i<strlen(a);i++) { switch (a[i]) { case'A':printf("V");break; case'B':printf("W");break; case'C':printf("X");break; case'D':printf("Y");break; case'E':printf("Z");break; case'F':printf("A");break; case'G':printf("B");break; case'H':printf("C");break; case'I':printf("D");break; case'J':printf("E");break; case'K':printf("F");break; case'L':printf("G");break; case'M':printf("H");break; case'N':printf("I");break; case'O':printf("J");break; case'P':printf("K");break; case'Q':printf("L");break; case'R':printf("M");break; case'S':printf("N");break; case'T':printf("O");break; case'U':printf("P");break; case'V':printf("Q");break; case'W':printf("R");break; case'X':printf("S");break; case'Y':printf("T");break; case'Z':printf("U");break; default:printf("%c",a[i]); } } printf("\n"); } system("pause"); return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator