• Post Reply Bookmark Topic Watch Topic
  • New Topic

so i am stuck here trying to create a historgram and i did this a while ago but different  RSS feed

 
Jonothon Turner
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
its been a long time for me coding wise and i seem to be drawing a blank here
this is what i want to happen

however this is what is happening

here is my code


 
Norm Radder
Ranch Foreman
Posts: 2240
28
 
Campbell Ritchie
Marshal
Posts: 55789
164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take NR's point. People here and in the other forum need to know if you post the same question on two websites. Also work out how the code tags work; they are similar to the other forum. I corrected your tags this time. I also added code tags round your desired output because the tags also improve the appearance of outputs. Do you really want the output double‑spaced?

I am afraid I don't like your solution because:-
  • 1: You have too much code in the main method, and you are actually writing procedural code rather than object code.
  • 2: Your loop in line 21 destroys information. If you get that loop to run, you will convert your array to {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}.
  • Please look very carefully at the loop in line 16 and work out how many times it will run.
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!