| ||||||||||
| 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 | |||||||||
Re:why Presentation Error?In Reply To:Re:why Presentation Error? Posted by:shunan at 2005-09-09 13:30:38 你的输入不能使这个程序结束
> 这是我的代码,麻烦看一下输出格式那里有错?我崩溃了!thx!!!
> #include<stdio.h>
> #include<string.h>
> char key[27],tran[81],tranto[81];
> int main()
> {
> int i,count=0,len;
> scanf("%s",key);
> while(1==scanf("%s",tran))
> {
> count++;
> len=strlen(tran);
> for(i=0;i<len;i++)
> {
> if(tran[i]>90)
> {
> tranto[i]=key[tran[i]-97];
> }
> else
> {
> tranto[i]=key[tran[i]-65];
> tranto[i]-=32;
> }
> }
> tranto[len]=0;
> if(count==1)
> {
> printf("%s",tranto);
> }
> else
> {
> printf(" %s",tranto);
> }
> }
> printf("\n");//°把这行去了,还是PE!啊
> return 0;
> }
>
>
>
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator