IsaguirreDaniel_Dice.java - Isaguirre Daniel G 1:30-6:00 WTHFS import java.util.Scanner import java.util.Random public class IsaguirreDaniel_Dice public

IsaguirreDaniel_Dice.java - Isaguirre Daniel G 1:30-6:00...

This preview shows page 1 - 2 out of 2 pages.

/** Isaguirre, Daniel G. 1:30-6:00 WTHFS */ import java.util.Scanner; import java.util.Random; public class IsaguirreDaniel_Dice { public static void main(String args[]) { Scanner input = new Scanner(System.in); System.out.print("Enter the amount of times a pair fo dice will roll : "); int times = input.nextInt(); int[][] dicePairs = rollDicePairs(times); System.out.println("The rolled pairs of numbers are : "); printDicePairs(dicePairs); System.out.println("The sum of each pairs of numbers are :"); int[] dicePairsSums = addDicePairs(dicePairs); printDicePairsSum(dicePairsSums); } public static int[][] rollDicePairs(int times) { int[][] dice = new int[times][2]; Random die = new Random(); for (int x = 0; x < times; x++)

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture