/* Copyright 2005 Daniel Cer (daniel.cer@cs.colorado.edu) This work is licensed under the Creative Commons Attribution-NonCommercial- ShareAlike License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/2.5/ or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA. */ import java.util.Random; public class LibraryRandomNumber { static public void main(String[] args) { if (args.length != 2) { System.err.println( "Usage:\n\tjava LibraryRandomNumber [int/real] (count)"); System.exit(-1); } String type = args[0]; int count = Integer.parseInt(args[1]); if (count <= 0) { System.err.println( "Error: count should be an integer > 0"); System.exit(-1); } Random rand = new Random(); if (type.equals("int")) { for (int i=0; i