Writing a rollDice method
I need to use the random number generation library and use 2 different ways to generate random numbers that simulate a dice roll. Pretty much a user will enter the number of times they will roll the dice and the output will print out how many times (and percentage) a total of 2 and a total of 7 will appear. Below is what I have so far. please advice: import java.util.Scanner; import java.util.Random; public class Dice { //jh15b public static void main(String[] args) { Scanner input = new Scanner (System.in); int N; //input of the number of times the dice will roll System.out.print("How many times would you like to roll the two dice? "); N = input.nextInt(); Random rnd = new Random(); int n1 = rnd.nextInt(); System.out.println(n1); for(int i=0; i<10; i++) { //print out dice's faces int n2 = 1+ rnd.nextInt(6); } } }