import ( "fmt" "math/big" ) func main() { a := big.NewInt(10) b := big.NewInt(3) quotient := new(big.Int) quotient.Quo(a, b) fmt.Println(quotient) // Output: 3 }
import ( "fmt" "math/big" ) func main() { a := big.NewInt(5) b := big.NewInt(0) quotient := new(big.Int) quotient.Quo(a, b) fmt.Println(quotient) // Output: panic: division by zero }In this example, we attempt to calculate the quotient of `a` divided by `b`, which is equivalent to dividing by zero. This will result in a runtime panic. It is important to note that the `big.Int` values passed as arguments to the `Quo` method must not be nil, otherwise a runtime error will occur.