/*
Veidoja : Kims Matukevičs
Grupa: 110
Praktiskais darbs 6.3
Izmantotais Compiler : www.onlinegdb.com
*/
using System;

class Program
{
    static void Main()
    {
        while (true)
        {
            Console.WriteLine("Izvelies uzdevumu:");
            Console.WriteLine("1 - Skaitla zimes noteiksana");
            Console.WriteLine("2 - Nedelas diena");
            Console.WriteLine("3 - Atzimju kalkulators");
            Console.WriteLine("4 - Kalkulators");
            Console.WriteLine("5 - Garais gads");
            Console.WriteLine("6 - Bilesu atlaides");
            Console.WriteLine("0 - Iziet");
            Console.Write(">> ");

            string izvele = Console.ReadLine();
            Console.WriteLine();

            if (izvele == "0")
                break;

            switch (izvele)
            {
                case "1":
                    Console.Write("Ievadi skaitli: ");
                    int x = int.Parse(Console.ReadLine());
                    if (x > 0)
                        Console.WriteLine("Pozitivs");
                    else if (x < 0)
                        Console.WriteLine("Negativs");
                    else
                        Console.WriteLine("Nulle");
                    break;

                case "2":
                    Console.Write("Ievadi dienas numuru (1-7): ");
                    int d = int.Parse(Console.ReadLine());
                    switch (d)
                    {
                        case 1: Console.WriteLine("Pirmdiena"); break;
                        case 2: Console.WriteLine("Otrdiena"); break;
                        case 3: Console.WriteLine("Treshdiena"); break;
                        case 4: Console.WriteLine("Ceturtdiena"); break;
                        case 5: Console.WriteLine("Piektdiena"); break;
                        case 6: Console.WriteLine("Sestdiena"); break;
                        case 7: Console.WriteLine("Svetdiena"); break;
                        default: Console.WriteLine("Nederigs numurs"); break;
                    }
                    break;

                case "3":
                    Console.Write("Ievadi punktus (0-100): ");
                    int p = int.Parse(Console.ReadLine());
                    if (p < 0 || p > 100)
                        Console.WriteLine("Nederiga vertiba");
                    else if (p >= 90)
                        Console.WriteLine("A");
                    else if (p >= 80)
                        Console.WriteLine("B");
                    else if (p >= 70)
                        Console.WriteLine("C");
                    else if (p >= 60)
                        Console.WriteLine("D");
                    else if (p >= 50)
                        Console.WriteLine("E");
                    else
                        Console.WriteLine("F");
                    break;

                case "4":
                    Console.Write("Ievadi A: ");
                    double a = double.Parse(Console.ReadLine());
                    Console.Write("Ievadi B: ");
                    double b = double.Parse(Console.ReadLine());
                    Console.Write("Ievadi darbibu (+ - * /): ");
                    string op = Console.ReadLine();
                    switch (op)
                    {
                        case "+":
                            Console.WriteLine(a + b);
                            break;
                        case "-":
                            Console.WriteLine(a - b);
                            break;
                        case "*":
                            Console.WriteLine(a * b);
                            break;
                        case "/":
                            if (b == 0)
                                Console.WriteLine("Kluda: dalisana ar nulli nav atlauta");
                            else
                                Console.WriteLine(a / b);
                            break;
                        default:
                            Console.WriteLine("Nezinama darbiba");
                            break;
                    }
                    break;

                case "5":
                    Console.Write("Ievadi gadu: ");
                    int g = int.Parse(Console.ReadLine());
                    if ((g % 4 == 0 && g % 100 != 0) || g % 400 == 0)
                        Console.WriteLine("Garais gads");
                    else
                        Console.WriteLine("Nav garais gads");
                    break;

                case "6":
                    Console.Write("Ievadi vecumu: ");
                    int v = int.Parse(Console.ReadLine());
                    Console.Write("Vai esi students (true/false): ");
                    bool s = bool.Parse(Console.ReadLine());
                    double cena = 10.0;
                    double gala = cena;

                    if (v < 6)
                        gala = 0;
                    else if (v <= 17)
                        gala = 5.0;
                    else if (v <= 25 && s)
                        gala = 7.5;
                    else if (v >= 65)
                        gala = 8.0;

                    Console.WriteLine("Gala cena: " + gala);
                    break;

                default:
                    Console.WriteLine("Nepareiza izvele");
                    break;
            }

            Console.WriteLine();
        }
    }
}