Skip to content

Instantly share code, notes, and snippets.

@Sadin
Last active November 17, 2015 00:56
Show Gist options
  • Save Sadin/57150e1434467a0d4a1f to your computer and use it in GitHub Desktop.
Save Sadin/57150e1434467a0d4a1f to your computer and use it in GitHub Desktop.
Write a program to pick PowerBall Lottery numbers. Your program must pick 5 unique random
integer numbers between, and including, 1 to 68. No duplicate numbers, store each number
in the array. As each number is picked, check the array to see if that number has already
been [ocled. If it is found in the array, discard it and pick a new number. Your array will
only have to be five entries in length. Once the array has all 5 entries, print the list of valus.
@Sadin
Copy link
Author

Sadin commented Nov 17, 2015

  1. Pick a number from ( 1 to 68 )
  2. If its not a dupilcate add it to the end of the array
  3. When array has 5 unique values print values

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment