lotto_3.txt
0.00MB
test.htm
0.00MB
/* var i,count=0,temp; var bExist ; var lotto = []; temp = Math.floor(Math.random()*45)+1; lotto[count++] = temp; while(true){ // 1~45 중복없이 6개 뽑자 bExist = false; //중복 X temp = Math.floor(Math.random()*45)+1; // 반복문 이용해서 중복 확인 for(i=0;i<count;i++) if(temp == lotto[i]){ bExist = true; break; } if(bExist==false) lotto[count++]=temp; if(count==6) break; } for(i=0;i<6;i++) document.write(lotto[i] + " "); */