Ruutvõrrand keeles C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Ruutv6rrand
{
class Program
{
static void Main(string[] args)
{
int a, b, c, D;
double X1, X2;
Console.WriteLine("Palun sisesta a vrtus:");
a = Convert.ToInt32(Console.ReadLine());
if (a == 0)
Console.Beep();
Console.WriteLine("Antud tehe ei ole ruutvrrand, kuna a
vrdub nulliga.");
if (a != 0)
Console.WriteLine("Palun sisesta b vrtus:");
b = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Palun sisesta c vrtus:");
c = Convert.ToInt32(Console.ReadLine());
D = b * b - 4 * a * c;
if (D >= 0)
{
X1 = (-b + Math.Sqrt(D)) / (2 * a);
X2 = (-b - Math.Sqrt(D)) / (2 * a);
Console