answersLogoWhite

0

An algorithm can not be written with the following infix expression without knowing what the expression is. Once this information is included a person will be able to know how to write the algorithm.

User Avatar

Wiki User

11y ago

What else can I help you with?

Continue Learning about Algebra

Program to convert a infix expression in to postfix and prefix expression in php?

To convert an infix expression to postfix and prefix in PHP, you can implement the Shunting Yard algorithm for postfix conversion and a modified approach for prefix conversion. For postfix, you use a stack to reorder operators based on their precedence and associativity while scanning the infix expression. For prefix, you can reverse the infix expression, convert it to postfix, and then reverse the resulting postfix expression. Here’s a brief code outline for both conversions: function infixToPostfix($infix) { // Implement the Shunting Yard algorithm to convert infix to postfix } function infixToPrefix($infix) { // Reverse the infix expression // Convert to postfix using infixToPostfix // Reverse the postfix result to get prefix } You would need to handle operators, parentheses, and precedence rules within these functions.


How do you convert algebraic expression into qbasic expression?

how can we convert algebraic expression into QBASIC a square + b square i = pTR/100 2xy mx+c a=r square a+b


When can you say that a rational algebraic expression is in standard form?

if it convert


How do you turn a distrubitive property number to an algabraic expression?

This question is so poorly phrased as to be unanswerable! There is no such thing as a distrubitive property. There is a distributive property but that is a property that applies to two binary operations (for example, the distributive property of multiplication over addition), but NOT to numbers. Also, there is no such word as algabraic. In any case, since there is no such thing as a distrubitive property number or even a distributive property number, it is not possible to convert that non-existent thing into an algebraic expression.


What is the first step in solving the following probem 2ft 9in plus 2.6ft?

You must either (A) convert 9 inches to decimal form, or (B) 0.6 feet into inches. So you have two choices here. I will demonstrate them both for you. (A) To convert 9 inches into decimal, divide 9 by 12, that is 9/12 9 --- = 0.75 feet. 12 (B) To convert 0.6 feet into inches, multiply 12 by 0.6, that 0.6 * 12 0.6 * 12 = 7.2 inches.

Related Questions

Algorithm to convert a number representing radix r1 to r2?

algorithm to convert a number representing radix r1 to radix r2


How do you convert expression to binary tree?

To convert an expression to a binary tree, you can use the Shunting Yard algorithm to first convert the expression from infix to postfix notation (Reverse Polish Notation). Then, iterate through the postfix expression, using a stack to create nodes for each operand and operator. For each operator, pop the required number of operands from the stack, create a new node for the operator, and link the operands as its children. Finally, push the new node back onto the stack until the expression is fully processed, resulting in a binary tree representing the expression.


Why you need convert a expression into postfix expression?

You convert an (infix) expression into a postfix expression as part of the process of generating code to evaluate that expression.


Write an algorithm to evaluate an infix expression using stack by converting?

To evaluate an infix expression using a stack, first convert the infix expression to postfix (Reverse Polish Notation) using the Shunting Yard algorithm. In this algorithm, use a stack to temporarily hold operators and output the operands and operators in the correct order based on their precedence and associativity. Once the expression is in postfix form, use another stack to evaluate it by processing each token: push operands onto the stack and pop the necessary number of operands for each operator, performing the operation and pushing the result back onto the stack. The final result will be the only value left in the stack after processing the entire postfix expression.


How can you convert a simple algorithm to recursive algorithm?

Linear search(a,item) n=length(a) for i=1 to n do if(a[i]==item) then return i end for return -1


How do you convert algebraic expression into qbasic expression?

how can we convert algebraic expression into QBASIC a square + b square i = pTR/100 2xy mx+c a=r square a+b


How to convert prefix to postfix?

convert to perfixed to postfixed


How can I convert a DFA to a regular expression using a DFA to regular expression converter?

To convert a Deterministic Finite Automaton (DFA) to a regular expression using a DFA to regular expression converter, you can follow these steps: Input the DFA into the converter. The converter will analyze the transitions and states of the DFA. It will then generate a regular expression that represents the language accepted by the DFA. The regular expression will capture the patterns and rules of the DFA in a concise form. By using a DFA to regular expression converter, you can efficiently convert a DFA into a regular expression without having to manually derive it.


How do you create an algorithm to convert a persons weight from pounds to kilograms?

hisince1 pound = 0.45359237 kilogramssoweight_in_kilo = weight_in_pounds * 0.45359237


Convert this expression to scientific notation -890.456?

-8.90456*102


When can you say that a rational algebraic expression is in standard form?

if it convert


How can I convert the multiplication of 3x8 into an equivalent expression using the multiplication of 1x10?

To convert the multiplication of 3x8 into an equivalent expression using the multiplication of 1x10, you can rewrite it as (3x8) (3x1) x (1x10).