Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

求指教

Posted by ACM20101610510 at 2011-07-17 00:43:08 on Problem 1298
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator