The Artima Developer Community
Sponsored Link

Java Answers Forum
how to print an histogram?????

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
bhavna raghuvanshi

Posts: 6
Nickname: bhavna13
Registered: Jun, 2010

how to print an histogram????? Posted: Jun 14, 2010 2:27 AM
Reply to this message Reply
Advertisement
Write a program to produce a histogram of data input values. Assume that the input to the program is a long list of numbers between 0 and 100 inclusive. Your program should count the number of values that are in the range 0-9, 10-19,.., 90-100, and then output a series of lines of * characters, with the length of the line corresponding to the number of values in that range. For example, if the input data was 27, 15, 34, 22, 11, 11, 19 (each on its own line, of course) then the output would be

****
**
*

Topic: why is it not working????? Previous Topic   Next Topic Topic: plz help me...........

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use