| ||||||||||
| 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 | |||||||||
Re:贴出代码,希望后面的同志一次过In Reply To:贴出代码,希望后面的同志一次过 Posted by:qq312873977 at 2009-04-16 19:32:08 > #include <stdio.h>
> #include <string.h>
> #include <ctype.h>
> int main()
> {
> char key[27]={0},input[100]={0};
> gets(key);
> gets(input);
> for(int i=0;i<strlen(input);i++)
> {
> if(input[i]==' ')
> continue;
> if(isupper(input[i]))
> input[i]=toupper(key[input[i]-'A']);
> else
> input[i]=key[input[i]-'a'];
> }
> puts(input);
> return 0;
> }
很好嘛
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator