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 |
new#include <iostream> using namespace std; int main() { char c[4][73],*p; int a[26]={0},i,j,max; for(i=0;i<4;i++) { cin.getline(c[i],73); for(p=c[i];*p!='\0';p++) if(*p>='A'&&*p<='Z') a[*p-'A']++; } max=a[0]; for(i=1;i<26;i++) if(max<a[i]) max=a[i]; for(i=max;i>=1;i--) { for(j=0;j<26;j++) { if(a[j]>=i)cout<<"* "; else cout<<" "; } cout<<endl; } for(i=0;i<26;i++) printf("%c ",'A'+i); return 1; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator