SHARE
TWEET

APCS2012_C2X7_DieSimulator.java

calcpage Sep 23rd, 2012 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Random;
  2. public class DieSimulator
  3. {
  4.         public static void main(String[] args)
  5.         {      
  6.                 Random ross = new Random();
  7.                 System.out.println(1+ross.nextInt(6));
  8.                 System.out.println(1+ross.nextInt(6));
  9.                 System.out.println(1+ross.nextInt(6));
  10.                 System.out.println(1+ross.nextInt(6));
  11.                 System.out.println(1+ross.nextInt(6));
  12.         }
  13. }
RAW Paste Data
Challenge yourself this year...
Learn something new in 2017
Top