2 shunfurh shunfurh 于 2017.09.10 09:53 提问

Vertical Histogram

Problem Description
Write a program to read four lines of upper case (i.e., all CAPITAL LETTERS) text input (no more than 72 characters per line) from the input file and print a vertical histogram that shows how many times each letter (but not blanks, digits, or punctuation) appears in the all-upper-case input. Format your output exactly as shown.

Input

  • Lines 1..4: Four lines of upper case text, no more than 72 characters per line.

Output

  • Lines 1..??: Several lines with asterisks and spaces followed by one line with the upper-case alphabet separated by spaces. Do not print unneeded blanks at the end of any line. Do not print any leading blank lines.

Sample Input
THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG.
THIS IS AN EXAMPLE TO TEST FOR YOUR
HISTOGRAM PROGRAM.
HELLO!

Sample Output
*
*
* *
* * * *
* * * *






A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

1个回答

devmiao
devmiao   Ds   Rxr 2017.09.27 21:52
已采纳
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐
POJ 2136 Vertical Histogram
分析:很久以前,在《K&R》上面碰到过这个题,只不过比这个复杂一点。。。。 也是水题,没什么说的,注意一下细节,比如输出的格式等,还有就是,一开始用的for循环,每输入一行结束后就直接打印,好郁闷^~_~^ Description Write a program to read four lines of upper case (i.e., all CAPITAL LETTE
求垂直直方图 输入四行大写字母打印每个字母分别出现的次数个*
题目描述Write a program to read four lines of upper case (i.e., all CAPITAL LETTERS) text input (no more than 72 characters per line) from the input file and print a vertical histogram that shows how many...
HDU2708 Vertical Histogram【水题】
Vertical Histogram Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5326    Accepted Submission(s): 1305 Problem Description Write a pro
Vertical Histogram垂直直方图
E - Vertical Histogram Crawling in process... Crawling failed Time Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Submit Status Description Write a progra
J - Vertical Histogram(1.5.7)
Description Write a program to read four lines of upper case (i.e., all CAPITAL LETTERS) text input (no more than 72 characters per line) from the input file and print a vertical histogram that sho
《数据结构编程实验》 1.5.7Vertical Histogram
《数据结构编程实验》 1.5.7Vertical Histogram 题解
POJ2136 Vertical Histogram【打印图案】
Vertical Histogram Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 19827   Accepted: 9483 Description Write a program to read four lines of upper case (i.e.,
POJ 2136 Vertical Histogram 打印特殊图形
根据题目要求打印出需要的输出格式。 这算是些趣味题目了,题目本身不难,要说难点就是考如何优雅地去编程了,主要是考编程基础功力。 而且好像测试系统不是十分严格,并不判断后面多余的空格,按题目要求是需要严格去掉后面多余的空格的。 处理这个问题就需要多点代码了。 下面看我使用一个额外的数组spaceHeight[ALP_LEN[来解决这个问题,做到半个多余的空格符也没有。
Vertical Histogram HDU 2708 代码详解
Vertical Histogram Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2472    Accepted Submission(s): 536 Problem Description Write a
Vertical Histogram——字母频率柱状图(POJ2136)
问题描述读取四行字母,并输出一个垂直柱状图用以显示在输入中的所有字母的出现次数。输入:1行到4行: 大写字母 , 每行不超过72个字符输出:第一行到第?行: 由星号和空格组成的若干行,最后一行由被分开的大写字母组成。输入样例: THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG. THIS IS AN EXAMPLE TO TEST FOR YOUR HI