Simple Quadratic Equation Solver - C++ - Do You Have Any Advices Would Like to Give? Programming Software Development by f.ben.isaac ….[/COLOR][/B] [CODE]/**program description: * * this program is a simple quadratic equation * solver. I tried to make the code talks about * itself by… Re: Simple Quadratic Equation Solver - C++ - Do You Have Any Advices Would Like to Give? Programming Software Development by f.ben.isaac [CODE]/**program description: * * this program is a simple quadratic equation * solver. I tried to make the code talks about * itself by … Quadratic Equations Solver Programming Software Development by Petcheco Hello, guys. I wrote the code to a Quadratic Equations Solver and I'd like for you to run … endl; Repetir(repetir); } return 0; } int main() { SetConsoleTitle("Quadratic Equation Solver"); setlocale(LC_ALL, "Portuguese"); Instrucoes(repetir); return 0… Re: Quadratic Equation Solver - C++ Sub-routine Programming Software Development by DavidB …* li) { // Calculates the zeros of the quadratic a*x^2 + b1*x + c // This solver computes both real only AND complex roots… == 0) { cout << "\n a = 0. NOT A QUADRATIC EQUATION! TWO ROOTS WILL NOT BE FOUND. \n"; cout <… Quadratic Equation Solver - C++ Sub-routine Programming Software Development by DavidB …: a C++ sub-routine that computes the roots of a quadratic equation. Notes: * This sub-routine checks if a = 0. * IF a… = 0, then the equation is actually not a quadratic equation; it is a linear equation with one--if any--root. * IF… Quadratic Equation Solver Python, Math Module Error Programming Software Development by matthewkeating I am writing a script that solves a Quadratic equation. What I am doing wrong and why? The error I … Print Each Calculation in a Quadratic Equation Programming Software Development by Doogledude123 Alright so I'm coding a Quadratic Equation Solver to help with my Math Class. However the teacher …requires each calculation to be written out. I have the solver working, however I'm not sure where to start ….out.println()` each step. But how does Java interpret the equation? Does it do proper BEDMAS(Brackets, Exponents, Division, Multiplication,… Advanced Quadratic Equation Programming Software Development by tstory28 I already understand how to do the quadratic equation when the it is in the format of ax^2 + … problem I am having to make it a fully functional quadratic equation solver, it needs to work with a being 2, 3, 4…, etc. Can someone explain how to change the equation to work with the a variable being 2+. Thanks for… Quadratic Solver/Info Programming Software Development by DoubleTapThat … library import math def solver(a,b,c): ############################################################### ### this function is used to solve the quadratic equation ### ### and includes …lt;") print(">>>>> QUADRATIC EQUATION SOLVER <<<<<") print("&… quadratic equation Programming Software Development by micheletsigab hey there i am trying to make quadratic equation problem solver. Re: quadratic equation Programming Software Development by Hiroshe > hey there i am trying to make quadratic equation problem solver. Good for you! Let us know if you run into any problems. Re: Quadratic Equation Solver - C++ Sub-routine Programming Software Development by sanjulovers can i suggest a more simpler version ( but a bit long) version of the same function????? Re: Quadratic Equation Solver - C++ Sub-routine Programming Software Development by DavidB If you are planning to submit your own code snippet, you are welcome to do so. But I would suggest you create your own thread for it, within the "Code Snippet" section. Re: Quadratic Equation Solver - C++ Sub-routine Programming Software Development by sanjulovers I thought it would be easier another way. i.e using only basic elements of c++ Re: Quadratic Equation Solver - C++ Sub-routine Programming Software Development by ~s.o.s~ David, it seems that your `<` and `>` have been turned into `&lt;` and `&gt;` respectively. Did you post it that way? If not, I'll have to ask Dani to look into it. Re: Quadratic Equation Solver - C++ Sub-routine Programming Software Development by DavidB > David, it seems that your < and > have been turned into &lt; and &gt; respectively. Did you post it that way? If not, I'll have to ask Dani to look into it. No, I did not post it that way. If you hadn't pointed it out, I wouldn't have even noticed it. Thanks for catching it. Yes, if an admin could edit the code to put the … Re: Quadratic Equation Solver - C++ Sub-routine Programming Software Development by DavidB > David, it seems that your < and > have been turned into &lt; and &gt; respectively. Did you post it that way? If not, I'll have to ask Dani to look into it. Oops, I just noticed a few more errors: Quotation marks (") in the cout statement have been replaced by &quot; and the newline character (\n) has been replaced by… Re: Quadratic Equation Solver - C++ Sub-routine Programming Software Development by ~s.o.s~ Can you post a clean version again so that I can update the original snippet? It would be too much work editing the original snippet. Also, if you didn't post it that way, this is something for Dani to look into. Re: Quadratic Equation Solver - C++ Sub-routine Programming Software Development by ~s.o.s~ Actually iamthwee brought it to our notice in [this thread he created](http://www.daniweb.com/community-center/daniweb-community-feedback/threads/456202/parsing-signs). Re: Quadratic Equation Solver - C++ Sub-routine Programming Software Development by Nutster You are assuming all your pointers are valid. You should check for NULL pointers before assigning to pointer targets. I would recommend using references to return the results instead of pointers. Otherwise, a nice idea. Re: Quadratic Equation Solver Python, Math Module Error Programming Software Development by Gribouillis Perhaps you're taking the square root of a negative number ? Also your formulas are false. Why not introduce a variable [icode]delta = b * b - 4 * a * c[/icode] to clean up the code ? Re: Quadratic Equation Solver Python, Math Module Error Programming Software Development by matthewkeating What do you mean? I first find the square root and then divide by 4ac. However I will fix the negative square root. Re: Quadratic Equation Solver Python, Math Module Error Programming Software Development by Gribouillis [QUOTE=matthewkeating;1583086]What do you mean? I first find the square root and then divide by 4ac. However I will fix the negative square root.[/QUOTE] See here [url]http://en.wikipedia.org/wiki/Quadratic_equation#Quadratic_formula[/url] :) and compare with your code. Numerical analysis works like mathematics: when you divide by a number, there … Re: Quadratic Equation Solver Python, Math Module Error Programming Software Development by TrustyTony Or you should move to the complex numbers domain as Python supports that. See module cmath. Re: Quadratic Equation Solver Python, Math Module Error Programming Software Development by nathan_czh sqrt cannot handle negative numbers, thus the error. If you get a negative number, obiously something is wrong with the inputs Re: Quadratic Equation Solver Python, Math Module Error Programming Software Development by Gribouillis > sqrt cannot handle negative numbers, thus the error. > If you get a negative number, obiously something is wrong with the inputs This is an old thread, matthewkeating probably found the solution since he wrote this program. Please answer recent threads, or create new ones ! Re: Simple Quadratic Equation Solver - C++ - Do You Have Any Advices Would Like to Give? Programming Software Development by mvmalderen It's better to avoid using [ICODE]system("PAUSE");[/ICODE] (look [URL="http://www.gidnetwork.com/b-61.html"]here[/URL] for more info) You could use [ICODE]cin.get();[/ICODE] instead ... Re: Simple Quadratic Equation Solver - C++ - Do You Have Any Advices Would Like to Give? Programming Software Development by adam1122 Instead of [icode]exit(0);[/icode], consider returning a bool from your function for success or failure. Then the program can continue. I second the [icode]cin.get()[/icode] thing. It probably doesn't really matter in this case, but it's something to consider. Re: Simple Quadratic Equation Solver - C++ - Do You Have Any Advices Would Like to Give? Programming Software Development by f.ben.isaac Ok, great... I didn't know that system("pause"); is very expensive 1.suspend your program 2.call the operating system 3. open an operating system shell (relaunches the O/S in a sub-process) 4. the O/S must now find the PAUSE command 5.allocate the memory to execute the command 6.execute the command and wait for a … Re: Simple Quadratic Equation Solver - C++ - Do You Have Any Advices Would Like to Give? Programming Software Development by mvmalderen [QUOTE=adam1122;842916]Instead of [icode]exit(0);[/icode], consider returning a bool from your function for success or failure. Then the program can continue. [/QUOTE] Yup, I forgot to mention that, but generally it isn't recommended to use the [ICODE]exit(0);[/ICODE] function ... [QUOTE=adam1122;842916] I second the [icode]cin.get()[/icode…