| ||||||||||
| 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 <string.h>
char cipher[500];
char plainText[27]={"VWXYZABCDEFGHIJKLMNOPQRSTU"};
int main()
{
int i, l;
while (gets(cipher))
{
if (strcmp("START",cipher) == 0) ;
else if (strcmp("END",cipher) == 0) printf("\n");
else if (strcmp("ENDOFINPUT",cipher) == 0) return 0;
else
{
l = strlen(cipher);
for (i = 0; i < l; i++)
{
if (cipher[i]>='A' && cipher[i]<='Z') printf("%c",plainText[cipher[i]-'A']);
else printf("%c",cipher[i]);
}
}
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator