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 "stdio.h" main() {int a[26]; char b[4][72]; int i,j,k; int max; for(i=0;i<26;i++) a[i]=0; for(i=0;i<4;i++) gets(b[i]); for(i=0;i<4;i++) for(j=0;j<72;j++) for(k=0;k<26;k++) if(b[i][j]==k+65)a[k]++; max=a[0]; for(i=0;i<26;i++) if(a[i]>max)max=a[i]; for(j=0;j<max;j++) {for(i=0;i<26;i++) {if(a[i]<max-j)printf(" "); else printf("*"); if(i<25)printf(" "); } printf("\n"); } for(i=0;i<26;i++) {printf("%c",i+65); if(i<25)printf(" ");} printf("\n"); return 1; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator