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了。。。。。In Reply To:OLE。。。搞不懂,会的朋友进来帮忙看看吧,感激不尽。。。 Posted by:Agan at 2006-09-12 22:56:39 #include"stdio.h" #include"math.h" #include"string.h" #include"stdlib.h" main() { char a[202]; int i; while(1) { scanf("%[^\n]",a);//输入START或ENDOFINPUT getchar(); if(strcmp(a,"ENDOFINPUT")==0) return(1); scanf("%[^\n]",a);//输入Cipher message getchar(); for(i=0;i<strlen(a);i++) { if(a[i]>='A'&&a[i]<='E') a[i]=a[i]+21; else if(a[i]>'E'&&a[i]<='Z') a[i]=a[i]-5; } printf("%s\n",a); scanf("%[^\n]",a);//输入END getchar(); } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator