Description:Remember Quadratic equation/Quadratic formula from high school maths? Something that solves equation in one variable of the form "x^2 + 2x + 1 = 0". Using this project, you dont need to solve that equation on paper anymore. This project simply asks for three coefficients "a" , "b" , "c" and solves the equation.

Difficulty: Easy

Language: Visual Basic.NET (VB.NET)

Compiler/IDE: Visual Studio

```
Module Module1

Sub Main()

Dim a, b, c As Single
Console.WriteLine("Write coefficient 'a'")
Console.WriteLine("Write coefficient 'b'")
Console.WriteLine("Write coefficient 'c'")

Dim d As Integer = b ^ 2 - 4 * a * c
If d >= 0 Then
If d = 0 Then
Console.WriteLine("Roots are real and equal")
Else
Console.WriteLine("Roots are real and different")
End If

Console.Write("Roots are: ")
Console.Write((-b + d ^ 0.5) / (2 * a) & " , ")
Console.WriteLine((-b - d ^ 0.5) / (2 * a))

Else
Console.WriteLine("Roots are complex")
Console.Write("Roots are: ")
Console.Write(-b / (2 * a) & "+" & (d * -1) ^ 0.5 / (2 * a) & "i")
Console.Write(" , ")
Console.WriteLine(-b / (2 * a) & "-" & (d * -1) ^ 0.5 / (2 * a) & "i")

End If