Command mathematicaloperation

The command mathematicaloperation is used to perform mathematical operations.

Parameters

  1. firstvalue [integer or string]
    First variable of the operation.
  2. operator [string]
    Mathematical Operators:
    • + add
    • - subtract
    • * multiply
    • / divide
    • % modulus (remainder of the division)
    • ^ exponent
  3. secondvalue [integer or string]
    Second variable of the operation.
  4. variabledestination [string ou integer]
    Variable where the result of operation will be stored.

Example


In the example above, 6 different mathematical operations have been performed on the values stored in the variables $(number_1) and $(number_2).

  • 1st operation: 16 + 4 = 20
  • 2nd operation: 16 - 4 = 12
  • 3rd operation: 16 * 4 = 64
  • 4th operation: 16 / 4 = 4
  • 5th operation: 16 % 4 = 0
  • 6th operation: 16 ^ 4 = 65536