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 |
3981怎么会是错误答案呢,谁能帮我看下代码,非常感谢#include<stdio.h> #include<string.h> void main() { char s[2005],k[10]={"EOF"}; int i,j; while(gets(s)) { if(strcmp(s,k)==0)break; for(i=0;i<strlen(s);i++) { if(s[i]=='y'&&s[i+1]=='o'&&s[i+2]=='u') { s[i]='m';s[i+1]='e';for(j=i+2;j<strlen(s);j++)s[j]=s[j+1];} }printf("%s",s); } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator