Search:

Type: Posts; User: Nuggets

Search: Search took 0.12 seconds.

  1. Replies
    9
    Views
    5,609

    [SOLVED] Re: Printing A Histogram...

    for (total=2; total<=numbThrows; total++)
    Okay, for the code above, I replaced the numbThrows with a 12.

    for (total=2; total<=12; total++)
    This seemed to fix the problem with the 13 occurring...
  2. Replies
    9
    Views
    5,609

    [SOLVED] Re: Printing A Histogram...

    import java.util.*;
    public class DiceSim {
    public static void main(String[] args) {
    Scanner Input = new Scanner(System.in);

    int[] frequency = new int [13]; //Declares the array
    int...
  3. Replies
    9
    Views
    5,609

    [SOLVED] Re: Printing A Histogram...

    Removing frequency[total] helped , as it got rid of those numbers. But then it added a 13 to the output. Do you know where that 13 came from?
    Before with frequency[total] -
    2: 2**
    3: 5*****
    4:...
  4. Replies
    9
    Views
    5,609

    [SOLVED] Re: Printing A Histogram...

    Can anyone help me?
  5. Replies
    9
    Views
    5,609

    [SOLVED] Re: Printing A Histogram...

    I think the problem lies in this line..

    System.out.print(
    " " + total + ": " + frequency[total] + " ");
  6. Replies
    9
    Views
    5,609

    [SOLVED] Printing A Histogram...

    This code is for a dice simulator. Rolling 2 dice and printing out the results in the form of a histogram. The code runs fine. It's just that I don't want to see the number percentages with the...
Results 1 to 6 of 6