package main import ( "fmt" "os" "strconv" ) var numFinal int = 1 func main() { if len(os.Args) < 2 || len(os.Args) > 2 { fmt.Println("Usage: ./factorial 10") os.Exit(1) } arg := os.Args[1] numFactorial, err := strconv.Atoi(arg) if err != nil { fmt.Println(err) } for i := 1; i <= numFactorial; i++ { numFinal = numFinal * i } fmt.Println("El nĂºmero factorizado es:", numFinal) }