In order to compute inputs from users and to generate results, we need to use various mathematical operators. In Visual Basic, except for + and -, the symbols for the operators are different from normal mathematical operators,as shown below.
Operator | Mathematical function | Example |
^ | Exponential | 2^4=16 |
* | Multiplication | 4*3=12 |
/ | Division | 12/4=3 |
Mod | Modulus(return the remainder from an integer division) | 15 Mod 4=3 |
\ | Integer Division(discards the decimal places) | 19\4=4 |
+ or & | String concatenation | "Visual"&"Basic"="Visual Basic" |