Menu
×
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

Go Arithmetic Operators


Arithmetic Operators

Arithmetic operators are used to perform common mathematical operations.

Operator Name Description Example Try it
+ Addition Adds together two values x + y Try it »
- Subtraction Subtracts one value from another x - y Try it »
* Multiplication Multiplies two values x * y Try it »
/ Division Divides one value by another x / y Try it »
% Modulus Returns the division remainder x % y Try it »
++ Increment Increases the value of a variable by 1 x++ Try it »
-- Decrement Decreases the value of a variable by 1 x-- Try it »

Go Exercises

Test Yourself With Exercises

Exercise:

Multiply 10 with 5, and print the result.

package main   
import ("fmt") 
func main() { fmt.Print(105) }

Start the Exercise