package main import "fmt" func main() { var factorial int64 = 1 var number int fmt.Print("请输入一个整型:") fmt.Scanf("%d", &number) for i := 1; i <= number; i++ { factorial = factorial * int64(i) } fmt.Printf("%d的阶乘是%d\n", number, factorial) }
pardon110
慕田峪4261139