| ||||||||||
| 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 | |||||||||
AC了的代码,呵呵#include <iostream>
using namespace std;
int main()
{
char *s="VWXYZABCDEFGHIJKLMNOPQRSTU";
char code[101];
char temp[10];
gets(temp);
while (strcmp(temp,"START") == 0)
{
gets(code);
int i;
for (i=0; i<=strlen(code)-1; i++)
{
if (code[i]>='A' && code[i]<='Z' )
{
code[i] = s[code[i]-'A'];
}
}
gets(temp);
puts(code);
gets(temp);
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator