public static void main(String[] args) {
		// Lotto 649 requires that six unique numbers be chosen.
		int[] selectedNumbers = new int[6];
		// Assign a unique random number from 1 to 49 (inclusive) to each slot
		// in the selectedNumbers array.
		for (int slot = 0; slot < selectedNumbers.length; slot++) {
			int num;
			// Obtain a random number from 1 to 49. That number becomes the
			// selected number if it has not previously been chosen.
			try_again: do {
				num = rnd(49) + 1;
				for (int i = 0; i < slot; i++)
					if (selectedNumbers[i] == num)
						continue try_again;
				break;
			} while (true);
			// Assign selected number to appropriate slot.
			selectedNumbers[slot] = num;
		}

		// Sort all selected numbers into ascending order and then print these
		// numbers.
		sort(selectedNumbers);
		for (int i = 0; i < selectedNumbers.length; i++)
			System.out.print(selectedNumbers[i] + " ");
	}