100% found this document useful (1 vote)
47 views5 pages

Exercises 2904

The document contains a series of exercises for evaluating and converting mathematical expressions in postfix, prefix, and infix notation. It includes tasks for evaluating expressions, converting between notations, and classifying expressions. The exercises are numbered and cover various mathematical operations, including addition, subtraction, multiplication, division, and exponentiation.

Uploaded by

emailao031
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
47 views5 pages

Exercises 2904

The document contains a series of exercises for evaluating and converting mathematical expressions in postfix, prefix, and infix notation. It includes tasks for evaluating expressions, converting between notations, and classifying expressions. The exercises are numbered and cover various mathematical operations, including addition, subtraction, multiplication, division, and exponentiation.

Uploaded by

emailao031
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

APCS-AB Exposure Java Exercises 29.

4 Date:
Name: Period:

01-05 EVALUATE THESE POSTFIX EXPRESSIONS

The “carrot” symbol ( ^ ) denotes powers like xy.

01. 4 5 3 + -

02. 9 8 4 2 + - *

03. 12 5 - 4 5 3 + - *

04. 15 5 / 3 ^

05. 7 8 4 - * 13 5 3 ^ + +

06-10 EVALUATE THESE PREFIX EXPRESSIONS

06. * + 5 2 4

07. + - * 9 8 7 6

08. * - + 3 5 4 / + 4 6 2

09. ^ * 3 4 - 9 6

10. ^ * - + 4 3 5 / + 2 4 3 + 2 3

8/15/2007
11-15 CONVERT POSTFIX EXPRESSION TO INFIX EXPRESSION

11. 4 5 3 + -

12. 9 8 4 2 + - *

13. 12 5 - 4 5 3 + - *

14. 15 5 / 3 ^

15. 7 8 4 - * 13 5 3 ^ + +

16-20 CONVERT PREFIX EXPRESSION TO INFIX EXPRESSION

16. * + 5 2 4

17. + - * 9 8 7 6

18. * - + 3 5 4 / + 4 6 2

19. ^ * 3 4 - 9 6

20. ^ * - + 4 3 5 / + 2 4 3 + 2 3

8/15/2007
21-25 CONVERT INFIX EXPRESSION TO POSTFIX EXPRESSION

21. 5 + 3 * 4

22. 7 - 7 * 4 + 8

23. ( 8 + 4 ) / ( 12 - 2 )

24. ((A - B) / (X + Y)) ^ Q

25. A + B * C - D / E ^ F

26-30 CONVERT INFIX EXPRESSION TO PREFIX EXPRESSION

26. 5 + 3 * 4

27. 7 - 7 * 4 + 8

28. ( 8 + 4 ) / ( 12 - 2 )

29. ((A - B) / (X + Y)) ^ Q

30. A + B * C - D / E ^ F

8/15/2007
31-35 CONVERT POSTFIX EXPRESSION TO PREFIX EXPRESSION

31. 4 5 3 + -

32. 9 8 4 2 + - *

33. 12 5 - 4 5 3 + - *

34. 15 5 / 3 ^

35. 7 8 4 - * 13 5 3 ^ + +

36-40 CONVERT PREFIX EXPRESSION TO POSTFIX EXPRESSION

36. * + 5 2 4

37. + - * 9 8 7 6

38. * - + 3 5 4 / + 4 6 2

39. ^ * 3 4 - 9 6

40. ^ * - + 4 3 5 / + 2 4 3 + 2 3

8/15/2007
41-45 CLASSIFY EXPRESSION AS PREFIX, POSTFIX, OR INFIX

41. 1 2 3 + -

42. * + 4 5 - 6 7

43. ( 8 + 9 + 10 ) / 3

44. 1 2 + 3 -

45. + 4 5 - 6 * 7

46-50 EVALUATE THESE INFIX EXPRESSIONS

46. 5 + 3 * 4

47. 7 - 7 * 4 + 8

48. ( 8 + 4 ) / ( 12 / 2 )

49. ((8 - 2) / (1 + 2)) ^ 7

50. 100 + 2 * 40 - 18 / 3 ^ 2

8/15/2007

You might also like