Advertisement
Guest User

Untitled

a guest
May 22nd, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. int die1,die2;
  2. Random randomInt=new Random();
  3. die1=randomInt.nextInt(100)+1;
  4. die2=randomInt.nextInt(100)+1;
  5.  
  6. int sum=die1+die2;
  7. JOptionPane.showMessageDialog(null, "Die 1= "+die1+"\n Die 2 = "+die2
  8. +"\nThe sum of the two dice is: "+sum);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement