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 |
为什么回是介绍形错误呢????#include<iomanip.h> #include<string.h> int main() { char a[26],ch; cin>>a; /* cin.get(ch); cin.get(ch); if(ch>='a'&&ch<='z') { cout<<a[ch-'a']; } else { cout<<ch; }*/ while(cin.get(ch)) { if(ch>='A'&&ch<='Z') { char cha=a[ch-'A']-32; cout<<cha; } if(ch>='a'&&ch<='z') { cout<<a[ch-'a']; } else if(!(ch>='a'&&ch<='z')&&!(ch>='A'&&ch<='Z')) { cout<<ch; } } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator