Search:

Type: Posts; User: Heri623

Search: Search took 0.08 seconds.

  1. Replies
    10
    Views
    1,078

    [SOLVED] Re: help with array

    all 0s. is there a problem with this line?
    numberAsterisk = (int) ((tally[i] / numberRolls) * 100);

    Shouldn't that take the element at position i in the array, divide by number of rolls,...
  2. Replies
    10
    Views
    1,078

    [SOLVED] Re: help with array

    Got that part working, thanks. Now I'm trying to print percentages, but I can't get it to go through the second for loop. j starts at 0, and numberAsterisk is a percentage, so shouldn't it print...
  3. Replies
    10
    Views
    1,078

    [SOLVED] Re: help with array

    cry?
    i set the array to 11
    but then i get this error
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 11
  4. Replies
    10
    Views
    1,078

    [SOLVED] Re: help with array

    what's possible is 2-12 impossible would 1, and anything >12
    11 elements stored in the array 2-12
    first would be 0 and last would be 11
  5. Replies
    10
    Views
    1,078

    [SOLVED] help with array

    my assignment is to code a program to simulate the rolling of 2 dice. I have most of it set but when I run it and have it print out how many times each number (2-12) was rolled, it displays the...
Results 1 to 5 of 5