로또번호 생성

Jmnote (토론 | 기여)님의 2022년 9월 17일 (토) 18:45 판 (→‎PHP)
로또번호 생성, 로또 숫자 생성
함수 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 }}