/*
Rūdolfs Čābūts
Praktiskais darbs 6.2
https://www.onlinegdb.com/online_csharp_compiler

*/
using System;

class Program 
{
  static void Main() 
  {
      //1.Uzdevums
      
    Console.WriteLine("Ievadi veselu skaitli: ");
        int num = Convert.ToInt32(Console.ReadLine());
        
        if (num > 0)
        {
            Console.WriteLine("Skaitlis ir pozitīvs");
        }
        else if (num < 0)
        {
            Console.WriteLine("Skaitlis ir negatīvs");
        }
        else if (num == 0)
        {
            Console.WriteLine("Skaitlis ir nulle");
        }
        
        //2.Uzdevums
        
        int diena;
        Console.WriteLine("Ievadi nedelas dienu: ");
        diena = Convert.ToInt32(Console.ReadLine());
        switch (diena) 
        {
  case 1:
    Console.WriteLine("Pirmdiena");
    break;
  case 2:
    Console.WriteLine("Otrdiena");
    break;
  case 3:
    Console.WriteLine("Tresdiena");
    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;
            
        }
 
 //3.Uzdevums
 
 Console.WriteLine("Ievadi savu atzimi: ");
 int atzime = Convert.ToInt32(Console.ReadLine());
 
 if (atzime>100 || atzime<0)
        {
            Console.WriteLine("Ievaditais skaitlis nav diapozona!");
        }
        else if (atzime >= 90)
        {
            Console.WriteLine("Atzīme - A");
        }
        else if (atzime >= 80)
        {
            Console.WriteLine("Atzīme - B");
        }
        else if (atzime >= 70)
        {
            Console.WriteLine("Atzīme - C");
        }
        else if (atzime >= 60)
        {
            Console.WriteLine("Atzīme - D");
        }
        else if (atzime >= 50)
        {
            Console.WriteLine("Atzīme - E");
        }
        else if (atzime <= 49)
        {
            Console.WriteLine("Atzīme - F");
        }
      
      //4.Uzdevums
      
    Console.WriteLine("Ievadi skaitli A: ");
 int a = Convert.ToInt32(Console.ReadLine());
 Console.WriteLine("Ievadi skaitli B: ");
 int b = Convert.ToInt32(Console.ReadLine());
 Console.WriteLine("Ievadi darbibas zīmi: ");
 char zime = Console.ReadKey().KeyChar;
 int rezultats;
 
 switch (zime)
 {
     case '+':
     rezultats = a + b;
       Console.WriteLine("Rezultats ir " + rezultats);
     break;
     
     case '-':
     rezultats = a - b;
       Console.WriteLine("Rezultats ir " + rezultats);
     break;
     
     case '*':
     rezultats = a * b;
       Console.WriteLine("Rezultats ir " + rezultats);
     break;
     
     case '/':
     rezultats = a / b;
       Console.WriteLine("Rezultats ir " + rezultats);
     break;
     
     if (b != 0)
     rezultats = a / b;
            else
            {
            Console.WriteLine("Nevar dalīt ar nulli!");
            }
     break;
     
     default:
        Console.WriteLine("Nepareiza darbības zīme!");
        break;
 }
 
//5.Uzdevums

  Console.WriteLine("Ievadi kadu gadu: ");
 int gads = Convert.ToInt32(Console.ReadLine());
 
 if (gads % 4==0 && gads % 100!=0 || gads%400==0)
 {
Console.WriteLine("Gads ir garais.");
}else Console.WriteLine("Gads ir isais gads");
 
 
 //6.Uzdevums
 
 Console.WriteLine("Ievadi savu vecumu: ");
 int vecums = Convert.ToInt32(Console.ReadLine());
 Console.WriteLine("Vai tu esi studnets (true vai false): ");
 bool irStudents = Convert.ToBoolean(Console.ReadLine());
 double atlaide = 0;
 int atlaideP = 0;
 double cena = 10;
 
 if (vecums <= 6)
 {
     atlaide = 0;
     atlaideP = 100;
 }
 else if (vecums <= 17)
 {
    atlaide = 0.5;
    atlaideP = 50;
 }
 else if (vecums <= 25 && irStudents==true)
 {
    atlaide = 0.75;
    atlaideP = 25;
 }
 else if (vecums >= 65)
 {
    atlaide = 0.8;
    atlaideP = 20;
 }
 else
 {
     atlaide = 1;
     atlaideP = 0;
 }
 
 Console.WriteLine("Cena: " + "$"+cena * atlaide + " Atlaide: " + atlaideP + "%");
 
  }
}