Archive for the 'C++' Category

June
25th 2008
A program that solves quadratic equations (C++)

Posted under C++ & Programming

I’m still a beginner at programming. I have not really decided if I want to learn ruby or c++, but for now I think c++ is more versatile. Anyway, I have made a little program that solves quadratic equations, with both real and complex solutions.

The quadratic formula itself can be found in my post Solve quadratic equations with php. The difference between the solving in these two cases, is that the php-solver do not solve the equation if the solution is complex.

Until I figure out a smart way to display nice looking code in my posts, the code can be found here. If you are familiar with c++, you should understand quite easy. I don’t think it is to difficult if you are familiar with another programming language, or programming in general either.

Download the program. Don’t worry about it being and .exe-file, even though they potentially are dangerous. This one is perfectly safe to download and use. Show care when downloading from the Internet.

I use Code Blocks when programming in c++, both for editing and compiling.

4 Comments »