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 zlinhua at 2009-02-27 19:43:16 on Problem 2141
#include<iostream>
#include<cstring>
using namespace std;
int main()
{
    char s[27],t[100];
    int i,j;
    gets(s);
    gets(t);
    for(i=0;t[i]!='\0';i++)
    {
            if(t[i]>='a'&&t[i]<='z')
            {
                j=t[i]-97;
                t[i]=s[j];
            }
            if(t[i]>='A'&&t[i]<='Z')
            {
                j=t[i]-65;
                t[i]=s[j]-32;
            }
    }
    puts(t);
    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