There are two variables, a and B, which requires the exchange, but does not allow the use of an intermediate variable, the final print.
package main
import (
"fmt"
)
func main() {
var a int = 10
var b int = 20
a = a + b
b = a - b
a = a - b
fmt.Printf("a=%v b=%v", a, b)
}
Execution results as shown below: