MHB No, this is not correct. The answer should be "Infix to Postfix: a*b/c+d/e/f

  • Thread starter Thread starter needOfHelpCMath
  • Start date Start date
AI Thread Summary
The discussion centers around converting the infix expression a*b/c+d/e/f into postfix notation. The correct postfix expression is identified as ab*c/de/f/+. This is explained by the fact that multiplication (*) and division (/) have the same precedence and are evaluated from left to right. The evaluation of the original expression is clarified as ((a*b)/c)+((d/e)/f), which aligns with the resulting postfix format. The user expresses gratitude for the clarification of their mistakes.
needOfHelpCMath
Messages
70
Reaction score
0
Code:
Here is my problem a*b/c+d/e/f:
*there is no code because professor ask me do hand write it out*

My answer: abc*/def//+is this correct?
 
Technology news on Phys.org
needOfHelpCMath said:
Code:
Here is my problem a*b/c+d/e/f:
*there is no code because professor ask me do hand write it out*

My answer: abc*/def//+is this correct?

Hi needOfHelpCMath! (Smile)

It should be: [M]ab*c/de/f/+[/M]

That's because * and / have the same priority and are evaluated left to right.
So the expression is evaluated as [M]((a*b)/c)+((d/e)/f)[/M].
The postfix expression reflects that.
 
I like Serena said:
Hi needOfHelpCMath! (Smile)

It should be: [M]ab*c/de/f/+[/M]

That's because * and / have the same priority and are evaluated left to right.
So the expression is evaluated as [M]((a*b)/c)+((d/e)/f)[/M].
The postfix expression reflects that.

thank you very much clarifies my mistakes!
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Thread 'Project Documentation'
Trying to package up a small bank account manager project that I have been tempering on for a while. One that is certainly worth something to me. Although I have created methods to whip up quick documents with all fields and properties. I would like something better to reference in order to express the mechanical functions. It is unclear to me about any standardized format for code documentation that exists. I have tried object orientated diagrams with shapes to try and express the...

Similar threads

Replies
1
Views
4K
Replies
3
Views
1K
Replies
1
Views
1K
Replies
10
Views
1K
Replies
14
Views
5K
Replies
2
Views
2K
Back
Top