Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 118,309 C++ Programmers for FREE! Ask your question and get quick answers from experts. There are 1,687 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



to check whether the given equation is a quadratic equation

 
Reply to this topicStart new topic

to check whether the given equation is a quadratic equation, if it is a quadratic equation..what kind of roots it has

shipsysn
post 8 Aug, 2008 - 11:20 AM
Post #1


New D.I.C Head

*
Joined: 8 Aug, 2008
Posts: 1

i dont know d code
User is offlineProfile CardPM

Go to the top of the page


gabehabe
post 8 Aug, 2008 - 11:25 AM
Post #2


T3H R0XX0R!

Group Icon
Joined: 6 Feb, 2008
Posts: 3,516



Thanked 73 times

Dream Kudos: 2350

Expert In: (X)HTML, CSS, Batch Scripting, C, C++

My Contributions


I don't know D code either. RodgerB knows some.

Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Please post like this:

Thank you for helping us helping you.
User is online!Profile CardPM

Go to the top of the page

NickDMax
post 8 Aug, 2008 - 11:58 AM
Post #3


2B||!2B

Group Icon
Joined: 18 Feb, 2007
Posts: 2,763



Thanked 37 times

Dream Kudos: 525
My Contributions


Well the requirements are rather vague. If the idea is to accept a string like "3x + 12x*x" than you can use a FSM (finite state machine) to recognize the expression as a quadratic equation -- while you are in the process of recognizing the expression you can also spend a few moments to save the coefficients. Then you can plug those coefficients into a nice formula to evaluate the result.

At least... thats how I would do it.
User is offlineProfile CardPM

Go to the top of the page

Reply to this topicStart new topic
Time is now: 10/10/08 11:42AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month