Giter Site home page Giter Site logo

algebraic_expressions's Introduction

Algebraic Expressions

In this script, we implement a program for manipulating algebraic expressions of infix and postfix forms. OUR implementation enables us to convert an expression of infix form to postfix form as well as to evaluate postfix expressions. Our implementation includes the following global functions.

  • string infix2postfix( const string exp );
  • double evaluatePostfix( const string exp );

Some assumptions

  1. The input strings are syntactically correct expressions; for example, we assume that the string is a valid infix expression if the infix2postfix function is called, or we assume that the string is a valid postfix expression if the evaluatePostfix function is called.
  2. An input string can include only digits and binary operators. We assume that only the binary operators *, /, +, and - are allowed (no unary and exponentiation operators are allowed). Moreover, we assume that operands are single digits (digits from 1 to 9). In the case of infix expressions, the string can also include parentheses in addition to digits and binary operators. For simplicity, you may assume that there are no spaces between the digits and operators.

algebraic_expressions's People

Contributors

sanaazz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.