Zebra0

Learn to Program Step-by-Step

Visual Basic Calculations, Order of Operations

Examples with Order of Operation

Equation Explanation
3 * (5 - 3 * 8 + 4)parenthesis first, within parenthesis, *  before + or -
3 * (5 - 24 + 4)if same level (+ and -), work from left to right
3 * (-19 + 4) parenthesis first
3 * (-15 )  
-45  
   
3 + (5 - 3) * (8 + 4) parenthesis first, left to right
3 + 2 * (8 + 4) parenthesis first
3 + 2 * 12 multiplication before addition
3 + 24  
27  
   
-3 * (6 * (3 - 8) + 10) inner-most parenthesis first
-3 * (6 * (-5) + 10) multiplication before addition
-3 * (-30 + 10) parenthesis first
-3 * (-20)  
60  
   
18 Mod 4 + 2 ^ 3 Exponentiation first
18 Mod 4 + 8 Mod before addition
2 + 8  
10  
   
5* 10 \ 3 -4 Multiplication before division
50 \ 3 -4 Division before minus
16 - 4  
12  

Follow through each example and make sure you understand how to get the answer.


INDEX,Arithmetic Operations, Modulus Operator, Order of Operations, Functions, Algebra,