Advertisement
Guest User

Untitled

a guest
Feb 1st, 2015
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. public class Lottery {
  2. public static void main(String[] args){
  3. try
  4. {
  5.  
  6. int[] LottoNumbers = new int[6];
  7. for(int i= 0; i<6; i++){
  8. LottoNumbers[i] = (int)(Math.random()*48+1);
  9. for(int j= 0;j<i;++j){
  10. if(LottoNumbers[i] == LottoNumbers[j])
  11. --i;
  12. }
  13. }
  14. int[] mLottoNumbers = new int[6];
  15. for(int k = 0; k<6; k++){
  16. String a = showInputDialog(null, "Number:");
  17. mLottoNumbers[k]= Integer.parseInt(a);
  18. }
  19.  
  20.  
  21.  
  22.  
  23. }
  24.  
  25.  
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement