/******************************************************************************
Online C# Compiler.
Code, Compile, Run and Debug C# program online.
Write your code in this editor and press "Run" button to execute it.
*******************************************************************************/
using System;
class HelloWorld {
static double sqrt(int a, int b, int c)
{
return Math.Sqrt(b * b - 4 * a * c);
}
static double x1(int a, int b, int c)
{
return (-b + sqrt(a, b, c))/(2*a);
}
static double x2(int a, int b, int c)
{
return (-b - sqrt(a, b, c))/(2*a);
}
static void Solution()
{
Console.Write("Enter a:");
int a = int.Parse(Console.ReadLine());
Console.Write("Enter b:");
int b = int.Parse(Console.ReadLine());
Console.Write("Enter c:");
int c = int.Parse(Console.ReadLine());
double r1 = x1(a, b, c);
Console.WriteLine("r1: {0}", r1);
double r2 = x2(a, b, c);
Console.WriteLine("r2: {0}", r2);
}
static void Main() {
Solution();
}
}