I m little stuck in my programme which I got as a assignment today
can anyone direct me that how to make a programme to find the roots of quadratic equation..???
What do you have so far? You will need the formula to determine the roots for a place to start.
I have no idea about it can u make it for me plz..??
No, I will not make it for you. The purpose of this site is not to do your homework for you, but to help if you run into problems. Here are a few thing to think about.

-How will the input be given to you will it be in the form Ax^2 + bx +c, or will the values a, b, and c being passed

-How will you take the values to use in your forumla (return both roots by reference or have 2 functions that return a root each)

Once you have given it a shot, people will be able to help you. You will not get help if you do not try it yourself. That inhibits learning.
yes its in form ax^2 +bx+c=0
and both roots by reference
All right, I would start then by creating the function that will return the roots and test it with a hard coded string. Once you have that done, you can work on reading in the input.

For that step, you will have to parse out the correct values from the string for a b and c and then use them with the quadratic formula to calculate both roots.
Topic archived. No new replies allowed.