Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Lottery {
- public static void main(String[] args){
- try
- {
- int[] LottoNumbers = new int[6];
- for(int i= 0; i<6; i++){
- LottoNumbers[i] = (int)(Math.random()*48+1);
- for(int j= 0;j<i;++j){
- if(LottoNumbers[i] == LottoNumbers[j])
- --i;
- }
- }
- int[] mLottoNumbers = new int[6];
- for(int k = 0; k<6; k++){
- String a = showInputDialog(null, "Number:");
- mLottoNumbers[k]= Integer.parseInt(a);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement