From 217d71f3ba9c92c4fd932c84702b2d36eb39cc22 Mon Sep 17 00:00:00 2001 From: filifa Date: Mon, 11 Aug 2025 23:05:29 -0400 Subject: [PATCH] simplify printing logic --- cmd/gcd.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cmd/gcd.go b/cmd/gcd.go index 31c7a44..76c3fe2 100644 --- a/cmd/gcd.go +++ b/cmd/gcd.go @@ -52,15 +52,13 @@ func gcd(cmd *cobra.Command, args []string) { } } + fmt.Print(&z) if extended { - fmt.Print(&z) for _, c := range coeffs { fmt.Printf(" %s", &c) } - fmt.Println() - } else { - fmt.Println(&z) } + fmt.Println() } // gcdCmd represents the gcd command