Solved

Polynomial in C++

Posted on 2006-11-09
3
1,565 Views
Last Modified: 2013-11-17
I have problem with polynomial. A program witten by C++
input : 2+3^2+4^6*10+sin30-cos45+........
output: result of polynomial

can send to me the code ? send to vhm1985@yahoo.com
thanks
0
Comment
Question by:kolosoxu
3 Comments
 
LVL 18

Accepted Solution

by:
JoseParrot earned 75 total points
ID: 17911508
Hello, kolosuxu,

It is against ee rules to post emails to direct communications. Also we can't send answers directly: all the answers are to be post here, in the same way I'm writing this now.

About the question, it is not a trivial one. You need a parser to read the string and capable of understanding ASCII codes for numbers, math signs (+ - * ^), trigronometric entities (sin, cos), capable also of execute the calculations under rules of precedence (first ^, then * and /, then + and -). This a good sizing program.

Your may want try the code at
http://www.eleves.ens.fr/home/ollivier/mathlib/mathexpr.html

Jose
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question