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 |
为什么总是Presentation Error,救救我!!!!!#include<iostream.h> int main() { int a[26]; int i,line,t; char ch; for(i=0;i<26;i++) a[i]=0; while(cin>>ch) { if(ch<'A'||ch>'Z') continue; ++a[ch-'A']; } line=0; for(i=0;i<26;i++) if(line<a[i]) { line=a[i]; } line++; while(--line>0) { t=26; while(a[--t]<line); for(i=0;i<=t;i++) { cout<<(a[i]>=line?'*':' '); } cout<<endl; } for(i=0;i<26;i++) { cout<<char('A'+i); } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator