SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 3 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 09 Dec 2017 My Price 6.00

postfix notation calculator. "Postfix notation"

Here's what's expected of the code.

 

Create a postfix notation calculator. "Postfix notation" is a particular way to order the operands and operators in an expression. In postfix notation, operands get pushed onto the stack and operators replace one or more values from the top of the stack with a new value that represents the result of some computation. For example, the mathematical expression "5 * (3 + 4)" is represented as "3 4 + 5 *" in postfix notation. Your postfix notation calculator should conform to these specifications:

  • Your program should evaluate each line from standard input as a postfix math expression.
  • Each term in an expression is separated by whitespace.
  • Each evaluation will modify the same stack or internal state.
  • After each evaluation, the top of value of the stack should be displayed.
  • The following operators and functions should be supported: +, -, *, /, %, ^, sqrt, sin, cos, tan, log, ln
  • Operands should be stored as type double in your program.
  • If an operand's string value is "e" or "pi", then the values of the C++ constants M_E or M_PI should be used instead.
  • Assume all expressions are well formed.

You will need to include <cmath> to use M_E, M_PI, and various math functions.

Answers

(5)
Status NEW Posted 09 Dec 2017 05:12 AM My Price 6.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)