/*
    Ingus Zemturis
    Gupa: 110
    Compiler: Visual Studio
*/
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;

namespace PLAYGROUND
{
    internal class Program
    {


        static void Main(string[] args)
        {
            // 1.uzd <<<<<<<<<<>>>>>>>>>>
           Console.WriteLine("ievadi veselu skaitli");
            int PolarityNumber = 0;
            PolarityNumber = Convert.ToInt32(Console.ReadLine());
            if (PolarityNumber > 0)
            {
                Console.WriteLine("skaitlis ir pozitīvs");
            }
            else if (PolarityNumber < 0)
            {
                Console.WriteLine("skaitlis ir negatīvs");
            }
            else
            {
                Console.WriteLine("skaitlis ir nulle");
            }

            // 2.uzd <<<<<<<<<<>>>>>>>>>>
           Console.WriteLine("ievadi nedēļas dienas nummuru");
            int weekday = 0;
            weekday = Convert.ToInt32(Console.ReadLine());
            switch (weekday)
            {
                case 1:
                    Console.WriteLine("pirmdiena");
                    break;
                case 2:
                    Console.WriteLine("otrdiena");
                    break;
                case 3:
                    Console.WriteLine("trešdiena");
                    break;
                case 4:
                    Console.WriteLine("ceturtdiena");
                    break;
                case 5:
                    Console.WriteLine("piekdiena");
                    break;
                case 6:
                    Console.WriteLine("sestdiena");
                    break;
                case 7:
                    Console.WriteLine("svētdiena");
                    break;
                default:
                    Console.WriteLine("nav tāda nedēļas diena");
                    break;
            }

            // 3.uzd <<<<<<<<<<>>>>>>>>>>
           Console.WriteLine("ievadi iegūto punktu skaitu");
            int Grade = 0;
            Grade = Convert.ToInt32(Console.ReadLine());
            if (Grade > 100)
            {
                Console.WriteLine("punktu skaits mazāks par 0 vai lielāks par 100 neder");
            }
            else if (Grade >= 90)
            {
                Console.WriteLine("A");
            }
            else if (Grade >= 80)
            {
                Console.WriteLine("B");
            }
            else if (Grade >= 70)
            {
                Console.WriteLine("C");
            }
            else if (Grade >= 60)
            {
                Console.WriteLine("D");
            }
            else if (Grade >= 50)
            {
                Console.WriteLine("E");
            }
            else if (Grade >= 0)
            {
                Console.WriteLine("F");
            }
            else
            {
                Console.WriteLine("punktu skaits mazāks par 0 vai lielāks par 100 neder");
            }

            // 4.uzd <<<<<<<<<<>>>>>>>>>>
           Console.WriteLine("ievadi skaitļus A, B, un darbības simbolu (+ vai - vai * vai /)");
            double FirstNumber;
            double SecondNumber;
            char Operator;
            double result;
            FirstNumber = Convert.ToInt32(Console.ReadLine());
            SecondNumber = Convert.ToInt32(Console.ReadLine());
            Operator = Convert.ToChar(Console.ReadLine());

            switch (Operator)
            {
                case '+':
                    result = FirstNumber + SecondNumber;
                    Console.WriteLine("rezultāts: " + result);
                    break;
                case '-':
                    result = FirstNumber - SecondNumber;
                    Console.WriteLine("rezultāts: " + result);
                    break;
                case '*':
                    result = FirstNumber * SecondNumber;
                    Console.WriteLine("rezultāts: " + result);
                    break;
                case '/':
                    if (SecondNumber == 0)
                    {
                        Console.WriteLine("nevar dalīt ar nulli");
                        break;
                    }
                    result = FirstNumber / SecondNumber;
                    Console.WriteLine("rezultāts: " + result);
                    break;
                default:
                    Console.WriteLine("nepareiza matemātikas operācijas zīme");
                    break;
            }

            // 5. <<<<<<<<<<>>>>>>>>>>
           Console.WriteLine("ievadi gadu");
            int years;
            years = Convert.ToInt32(Console.ReadLine());
            if (years % 4 == 0 && years % 100 != 0 || years % 400 == 0)
            {
                Console.WriteLine(years + " ir garais gads");
            }
            else
            {
                Console.WriteLine(years + " nav garais gads");
            }

            // 6. <<<<<<<<<<>>>>>>>>>>
            float price = 10;
            float discount = 0;
            int PrintDiscount;
            int age;
            char confirmation;
            bool student;
            Console.WriteLine("ievadi vecumu: ");
            age = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("vai tu esi students? Y/N");
            confirmation = Convert.ToChar(Console.ReadLine());
            if (confirmation == 'Y')
            {
                student = true;
            }
            else
            {
                student = false;
            }

            if (age < 6)
            {
                discount = 0;
                PrintDiscount = 100;
            }
            else if (age >= 6 && age <= 17)
            {
                discount = 0.5f;
                PrintDiscount = 50;
            }
            else if (age >= 18 && age <= 25 && student == true)
            {
                discount = 0.75f;
                PrintDiscount = 25;
            }
            else if (age >= 65)
            {
                discount = 0.8f;
                PrintDiscount = 20;
            }
            else
            {
                discount = 1;
                PrintDiscount = 0;
            }

            price = price * discount;
            Console.WriteLine("cena: " + price + "$ atlaide: " + PrintDiscount + "%");
        }
    }
}