Skip to content

arkenidar/ConsoleApp-Operators

Repository files navigation

examples of supported calculations requested as formulas

  • 3 + 2
  • 3 / 2
  • 3 % 2
  • -4 + 2 * 3
  • -1 * ( 5 + 3 + 1 )
  • 3 * ( sqrt 4 )
  • ( sqrt ( ( 3 ^ 2 ) + ( 4 ^ 2 ) ) )

currently supported operators

  • if (word == "+" || word == "-" || word == "*" || word == "/" || word == "^" || word == "%" || word == "sqrt")
  • "binary" means 2 operands for the operator
  • + summation (binary)
  • - subtraction (binary)
  • * multiplication (binary)
  • / division (binary)
  • % modulo (binary)
  • ^ exponentiation (binary)
  • sqrt square root (unary)
  • "unary" means 1 operand for the operator