i want to validate the String entered wether it is a valid standard equation of conics
the standard equation is:
ax^2+by^2+2hxy+2gx+2fy+c=0
some variables can be missed in input string but it should be of "degree 2" equation

i want to validate the String entered wether it is a valid standard equation of conics
the standard equation is:
ax^2+by^2+2hxy+2gx+2fy+c=0
some variables can be missed in input string but it should be of "degree 2" equation

Do you mean a quadratic equation like this: ax^2 + bx + c ?

By the way: May the terms be placed in another order?

Edit:: Sorry: I see that it's not what I thought, it's a conics equation (:P) ...

Investigate Regular Expressions, try to code it and if you have problems post it here

yes order may be different and eqution enterd may be qudratic but the strategy is ;equation should not be of degree three and higher

You want a conic section equation. If you want a simple fix, I would reccomend having the user enter each variable in turn, something like "enter x squared coefficient. enter y squared coefficient." that way you'll know exactly what is which, without having to parse stuff out of the string. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.