로또번호 생성

Jmnote (토론 | 기여)님의 2022년 9월 18일 (일) 12:52 판
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)
로또번호 생성, 로또 숫자 생성
함수 genLottoNums
함수 generateLottoNumbers

1 Bash[ | ]

shuf -i 1-45 -n6
shuf -i 1-45 -n6 | xargs -n6

2 PHP[ | ]

$nums = range(1,46);
shuffle($nums);
array_splice($nums, 6);
print_r($nums);

3 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}