Formula 1 - This algorithm removes commas and $ from input before processing
Operators
- + Add
- - Subtract
- * Multiply
- / Divide
- (parenthesis) Do this first
Use any PHP functions up to PHP Version 5.4.45. See examples below:
- sqrt(x) Returns the square root of a x
- pow(x,y) Returns x raised to the power of y -- use Formula 2
- rand() Generates a random integer
- rand(min,max) -- use Formula 2
- round(x) Rounds a floating-point number