/ * 1-14 Write a program, the histogram of the frequency of each character in the print input * /
#include
#include
Int main (void)
{
Int A, Array [26];
For (a = 0; a <26; a ) array [a] = 0;
A = 0;
While ((a = getchar ())! = EOF)
{
IF (a> = 'a' && a <= 'z') Array [A-'A '] ;
IF (a> = 'a' && a <= 'z') Array [A-'A '] ;
}
For (a = 0; a <26; a )
{
INT b = array [a];
Printf ("% C is:", A 'a');
For (; b> 0; b -) Printf ("*");
Printf ("/ n");
}
System ("pause");
Return 0;
}