| ||||||||||
| 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 | |||||||||
我还真没看出来有什么优越性,付c代码In Reply To:这道题充分显示了C++对C的优越性!!! Posted by:sicojuy at 2010-12-02 12:25:52 #include<stdio.h>
#include<string.h>
int main()
{
char temp[200]={0},temp1[50]={0},temp2[50]={0};
char den[30]={"VWXYZABCDEFGHIJKLMNOPQRSTU"};
int i=0;
gets(temp1);
while(strcmp(temp1,"ENDOFINPUT"))
{
gets(temp);
gets(temp2);
for(i=0;temp[i]!='\0';i++)
{
if(temp[i]>='A'&&temp[i]<='Z')
{
printf("%c",den[temp[i]-'A']);
}
else
{
printf("%c",temp[i]);
}
}
printf("\n");
gets(temp1);
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator