1 Year
Discussion Span
Last Post by toxicandy

You multiply the b constant by itself, that will be b^2.
Then you multiply 4, a and c together and substract that product from b^2.
You gave no more of the formula, so that is all I can do.


ddanbe is being nice. We don't do your homework for you - please read this site's terms of service. Make an honest attempt to solve the problem. Write the code. Post the code and problems, error messages, etc here and then we can help you.

Edited by rubberman


I agree with rubberman, you should attempt to do the work yourself but to set you in motion look at rproffitt's article as well as write it out on paper. It is always good to trying to solve the program using Pseudo code and then do the actually programming. Ask yourself questions like, what is the square root as an exponent, can I express it as such or is there some sort of method or function provided for me for square roots? Depending on the programming language you are using go check out some different Math library's and explore functions they can provide you with. If they are built in look up documentation for squareroots online and try and use them that way. Ddbanbe provided you with a method for acquiring the difference between b^2 and 4ac all you have to do is figure out how to take the square root of that result.

I noticed you are using C programming consider reading through this article and look at all the different mathmatical functions you can call with this library:

You will also have to learn how to include different libraries so consider looking through your C book if you have one or online for information on that. That library and document have everything you need and it is up to you to figure out how to use them. It is important to learn how to read the documentation of online articles for library syntax as you will undoubtably need to read them on your journey into learning the language.

Edited by toxicandy

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.