Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

How Would I Make This Program In Java?

You are learning to play a new game that involves 3 six-sided die. You know that if you knew the probablility for each of the possible rolls of the die that you’d be a much better competitor.

Since you have just been studying arrarys and using them to count multiple items that this program should be a snap to write. This will be cool since the last time we did this we work just looking for how many times 9 or 10 could be rolled and this program won’t require any if statements.

1 Answer

Relevance
  • 1 decade ago
    Favorite Answer

    int[] die_1 = new int[6];

    int[] die_2 = new int[6];

    int[] die_3 = new int[6];

    // r = new Random( 6 ) + 1;

    for( int i = 0; i< 10000; i++) {

    die_1[ r ]++

    die_2[ r ]++

    die_3[ r ]++

    // if you like, String the d1_d2_d3 and sort.But the exra requirments are stated in your question.

Still have questions? Get your answers by asking now.