/*
    Veidoja: Maksimilians Lukjanskis
    Grupa: 110
    Praktiskais darbs 7( 3 uzd)
    Izmantotais compiler: https://www.programiz.com/csharp-programming/online-compiler/
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;

public class TresaisUzdevums
{
    public static void Main()
    {
         int[,] plakne = new int[,]{
         {1,2},
         {3,4},
        };
        string rezultats = AprekinatPlaknesAttalumu(plakne);
        Console.WriteLine(rezultats);
        Console.WriteLine("Ievadiet gradus");
        double gradi = Convert.ToDouble(Console.ReadLine());
        string radiani = KonvertetRadianos(gradi);
        Console.WriteLine(radiani);
    }
    static string AprekinatPlaknesAttalumu(int[,] plakne){
        int x1 = plakne[0,0];
        int y1 = plakne[0,1];
        int x2 = plakne[1,0];
        int y2 = plakne[1,1];
        Console.WriteLine("Ievadiet x1:");
        plakne[0,0] = x1 = Convert.ToInt32(Console.ReadLine());
        Console.WriteLine("Ievadiet y1:");
        plakne[0,1] = y1 = Convert.ToInt32(Console.ReadLine());
        Console.WriteLine("Ievadiet x2:");
        plakne[1,0] = x2 = Convert.ToInt32(Console.ReadLine());
        Console.WriteLine("Ievadiet y2:");
        plakne[1,1] = y2 = Convert.ToInt32(Console.ReadLine());
        double d = Math.Sqrt(Math.Pow((x2-x1),2)+Math.Pow((y2-y1),2));
        return $"Atalums starp punkitem ir {d}";
    }
    static string KonvertetRadianos(double gradi){
        double radiani = gradi * (Math.PI/180);
        return $"radiana ir: {radiani}";
    }
}