Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

看不出毛病,大家帮助

Posted by qqliuyong at 2005-03-29 15:35:35 on Problem 2136
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator