Description Usage Arguments Value Author(s) Examples
This program computes the value by accepting the string input which is space-delimited arithmetic expression in postfix notation.
This program computes the value by accepting the string input which is space-delimited arithmetic expression in prefix notation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | check_valid_operators(operator)
check_operator(char)
check_digit(number)
perform_operation(z, x, y)
push(input_vector, values)
pop(input_vector)
calculate_postfix(input_string)
check_digit(number)
evaluate_prefix(expression)
|
operator |
A string with mathematical operators |
char |
This function checkd if the character value is |
number |
checks if input is a number |
z |
operand 2 |
x |
operand 1 |
y |
operator |
input_vector |
input vector |
values |
numeric values |
input_string |
A string with space-delimited integer arithmetic expression in postfix notation. |
expression |
A string with space-delimited integer arithmetic expression in prefix notation |
A integer value
A integer value
Som Bohora
Som Bohora
1 2 3 4 | calculate_postfix("2 3 1 * + 9 - ")
expr <- "+ 9 * - 2 5 + 3 2"
evaluate_prefix(expr)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.