编辑代码

package main

import (
	"fmt"
	"math/rand"
)

// ArrangeThree 排列三开奖随机号
func ArrangeThree() {
	for i := 0; i < 5; i++ {
		numThree := rand.Intn(10)
		fmt.Print(" ", numThree, " ")
	}
}

// ArrangeFive 排列五开奖随机号
func ArrangeFive() {
	for i := 0; i < 5; i++ {
		numFive := rand.Intn(10)
		fmt.Print(" ", numFive, " ")
	}
}

// SuperLotto5 大乐透开奖随机前五位
func SuperLotto5() {
	for i := 1; i <= 5; i++ {
		numLottoFive := rand.Intn(35)
		fmt.Print(" ", numLottoFive, " ")
	}
}

// SuperLotto2 大乐透开奖随机后两位
func SuperLotto2() {
	for i := 1; i <= 2; i++ {
		numLottoTwo := rand.Intn(12)
		fmt.Print(" ", numLottoTwo, " ")
	}
}

// UnionLotto6 双色球开奖随机号
func UnionLotto6() {
	for i := 1; i <= 6; i++ {
		numLottoFive := rand.Intn(33)
		fmt.Print(" ", numLottoFive, " ")
	}
}

// UnionLotto1 大乐透开奖随机后两位
func UnionLotto1() {
	for i := 1; i <= 1; i++ {
		numLottoTwo := rand.Intn(16)
		fmt.Print(" ", numLottoTwo, " ")
	}
}

func main() {
	fmt.Print("排列三随机号: ")
	ArrangeThree()
	fmt.Println("")

	fmt.Print("排列五随机号: ")
	ArrangeFive()
	fmt.Println("")

	fmt.Print("大乐透随机号: ")
	SuperLotto5()
	SuperLotto2()
	fmt.Println("")

	fmt.Print("双色球随机号: ")
	UnionLotto6()
	UnionLotto1()
	fmt.Println("")
}