All pastes #252478 Raw Edit

Someone

public text v1 · immutable
#252478 ·published 2006-11-19 16:29 UTC
rendered paste body
using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Skrifaðu inn fyrstu hliðina: ");
            int a = Int32.Parse(Console.ReadLine());

            Console.WriteLine("Skrifaðu inn aðra hliðina: ");
            int b = Int32.Parse(Console.ReadLine());

            Console.WriteLine("Skrifaðu inn þriðju hliðina: ");
            int c = Int32.Parse(Console.ReadLine());

            // Láta C vera stærstu töluna
            if (a>c)
            {
                int temp = c;
                c = a;
                a = temp;
            }
            if (b>c)
            {
                int temp = c;
                c = b;
                b = temp;
            }

            if (a == b && b == c)
            {
                Console.WriteLine("Jafnarma");
            }
            else if (a == b || a == c || b == c)
            {
                Console.WriteLine("Jafnhliða");
            }
            else if (a * a + b * b == c * c)
            {
                Console.WriteLine("90 gráður");
            }
            else
            {
                Console.WriteLine("Ekkert af þessu");
            }
        }
    }
}