Skip to content

Simple C# Windows Forms application that solves a quadratic equation (ax² + bx + c = 0) and displays real or imaginary solutions depending on the discriminant. Created using Visual Studio.

License

Notifications You must be signed in to change notification settings

StefanieF2004/QuadraticEquationSolver

Repository files navigation

Quadratic Equation Solver (C# Windows Forms)

This is a simple C# Windows Forms application that solves a quadratic equation of the form:

ax² + bx + c = 0 The program takes coefficients a, b, and c as input, calculates the discriminant D = b² - 4ac, and then displays the solutions based on the value of D: ##Logic

  • If D > 0 → two real and distinct solutions
  • If D = 0 → one real double root
  • If D < 0 → two complex (imaginary) solutions

The app is built in Visual Studio (C#) using Windows Forms, with basic input validation and result display using TextBoxes and Labels.

##How to Use

  1. Enter values for a, b, and c in the corresponding text fields.
  2. Click "Реши" to calculate the solutions.
  3. The results will be shown in the lower fields:
    • If real: solutions x₁ and x₂
    • If imaginary: real and imaginary parts
  4. Click "Избриши" to clear all inputs and results.

Features

  • Discriminant logic
  • Real & imaginary number support
  • Error handling for invalid input
  • Clean and easy-to-use UI

Example Screenshot

image

Technologies

  • Language: C#
  • IDE: Visual Studio
  • Framework: .NET Windows Forms

Author

Created by [Stefanija Fileva]
Faculty project – Computer Engineering and Technology
2025

License

This project is licensed under the MIT License – see the LICENSE file for details.

About

Simple C# Windows Forms application that solves a quadratic equation (ax² + bx + c = 0) and displays real or imaginary solutions depending on the discriminant. Created using Visual Studio.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages