An open API service indexing awesome lists of open source software.

https://github.com/stefanief2004/quadraticequationsolver

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.
https://github.com/stefanief2004/quadraticequationsolver

csharp quadratic-equations windows-forms

Last synced: 2 months ago
JSON representation

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.

Awesome Lists containing this project

README

          

# 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](https://github.com/user-attachments/assets/d619dae7-dc5b-4776-bc1d-0ca2bc4fa28e)
---
## 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](LICENSE) file for details.