Skip to content

tralf-strues/quadratic-equation-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

First college assignment

This is the first assignment I was given in college 🏫 (to be precise, it was in August, before the start of the new school year). Needless to say, I'm not crying, I swear... this will forever be one of the most memorable milestones of my life 😭 (don't care how stupid it may sound).

About

The program solves quadratic equations in complex numbers (see the example below).

Example:

Solving the equation

=== Quadratic equation solver ===
=== Equation ax2 + bx + c = 0 ===
Enter the coefficients in the following format "a b c": 1 2 3 ("1 2 3" - user input)
(1) * x2 + (2) * x + (3) = 0
Solution: x = -1 - 1.41421i OR x = -1 + 1.41421i

Testing the program

Being young and naive 🐣, I couldn't, it seems, make a debug mode, so each time you use the solver, it'll ask you whether to test the program or not 😄.

Do you want to test the program? Enter y - Yes, n - No:

If you, for some reason, answer yes, then it'll run 11 pre-built tests to make sure everything works correctly.

Source code documentation

My first doxygen documentation📑.