In Go, the basic arithmetic operations can be performed using the standard arithmetic operators. Here's how you can perform these operations:
+
operator to add two numbers together. For example:a := 5
b := 3
result := a + b
fmt.Println(result) // Output: 8
-
operator to subtract one number from another. For example:a := 8
b := 3
result := a - b
fmt.Println(result) // Output: 5
*
operator to multiply two numbers. For example:a := 5
b := 3
result := a * b
fmt.Println(result) // Output: 15
/
operator to divide one number by another. For example:a := 10
b := 2
result := a / b
fmt.Println(result) // Output: 5
Note that Go automatically handles the correct order of operations based on the arithmetic operators being used.