TORONTO KIDS COMPUTER CLUB | Markham Saturday 14:00 Java Homework 20.06.13.
17721
post-template-default,single,single-post,postid-17721,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.10.0,vc_responsive

Markham Saturday 14:00 Java Homework 20.06.13.

18 Jun Markham Saturday 14:00 Java Homework 20.06.13.

Question:
Write the code to find the solution to a postfix expression. More information for postfix expression can be found here http://www.cs.csi.cuny.edu/~zelikovi/csc326/data/assignment5.htm

( Assume there are only 4 operands namely * /  + –  )

Sample Input 1:
3 5 +

Sample Output 1:
8

Sample Input 2:
1 2 3 * +

Sample Output 2:
7

Sample Input 3:
1 2 + 3 4 + *

Sample Output 3:
21
No Comments

Sorry, the comment form is closed at this time.