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 |
试试把80改成800,可能会好In Reply To:求牛人帮忙看一下我的程序,到底哪里出问题了 Posted by:00448144 at 2005-05-17 21:18:03 > #include<iostream.h> > void main() > { > char a[26],b[80]; > cin>>a; > cin.ignore(); > cin.getline(b,80); > for(int i=0;b[i]!='\0';i++) > { > if(b[i]>='A'&&b[i]<='Z') > cout<<char(a[b[0]-'A']-32); > else if(b[i]>='a'&&b[i]<='z') > cout<<a[b[i]-'a']; > else if(b[i]==32) > cout<<" "; > } > cout<<endl; > } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator