| ||||||||||
| 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 | |||||||||
HELP!!!!!!!!!答案一样,why wrong answer!!!!!!!!!!!!#include<stdio.h>
#include<iostream.h>
#include<ctype.h>
#include<string.h>
#include<memory.h>
int main()
{
char s[205];
cin.getline(s,205);
while(strcmp(s,"ENDOFINPUT")!=0)
{
memset(s,'$',sizeof(s));
cin.getline(s,205);
int i=0;
while(s[i]!='$')
{
if(isalpha(s[i])==1)
{ if(s[i]=='A'||s[i]=='B'||s[i]=='C'||s[i]=='D'||s[i]=='E')
s[i]+=21;
else s[i]-=5;
}
i++;
};
s[i]='\0';
cout<<s<<endl;
cin.getline(s,205);cin.getline(s,205);
};
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator