Advertisement
Guest User

Untitled

a guest
Dec 15th, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.32 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Mobilen_ooperator
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             string srok = Console.ReadLine();
  14.             string tip = Console.ReadLine();
  15.  
  16.             string yesNo = Console.ReadLine();
  17.             double numb = double.Parse(Console.ReadLine());
  18.             double total = 0;
  19.             double cena = 0;
  20.  
  21.             if (srok == "one")
  22.                 if (tip == "Small")
  23.  
  24.                 { cena = 9.98;
  25.  
  26.                 }
  27.             if (srok == "two")
  28.                 if (tip == "Small")
  29.  
  30.                 {
  31.                     cena = 8.58;
  32.  
  33.                 }
  34.  
  35.             if (srok == "one")
  36.                 if (tip == "Middle")
  37.  
  38.                 {
  39.                     cena = 18.99;
  40.  
  41.                 }
  42.             if (srok == "two")
  43.                 if (tip == "Middle")
  44.  
  45.                 {
  46.                     cena = 17.09;
  47.  
  48.                 }
  49.             if (srok == "one")
  50.                 if (tip == "Large")
  51.  
  52.                 {
  53.                     cena = 25.98;
  54.  
  55.                 }
  56.             if (srok == "two")
  57.                 if (tip == "Large")
  58.  
  59.                 {
  60.                    cena = 23.59 ;
  61.  
  62.                 }
  63.  
  64.             if (srok == "one")
  65.                 if (tip == "ExtraLarge")
  66.  
  67.                 {
  68.                     cena = 35.99;
  69.  
  70.                 }
  71.             if (srok == "two")
  72.                 if (tip == "ExtraLarge")
  73.  
  74.                 {
  75.                     cena = 31.79;
  76.  
  77.                 }
  78.  
  79.             total = cena * numb;
  80.             if (yesNo == "yes")
  81.                 if (numb <= 10)
  82.  
  83.                 {
  84.                     total = (cena + 5.50) * numb;
  85.                 }
  86.             if (yesNo == "yes")
  87.                 if (numb > 10 && numb <= 30)
  88.  
  89.                 {
  90.                     total = (cena + 4.35) * numb;
  91.                 }
  92.  
  93.             if (yesNo == "yes")
  94.                 if (numb > 30)
  95.  
  96.                 {
  97.                     total = (cena + 3.85) * numb;
  98.                 }
  99.             if (srok == "two")
  100.             {
  101.                 total = total - (total * 3.75 /100)  ;
  102.             }
  103.                 Console.WriteLine("{0:f2} lv.", total);
  104.         }
  105.     }
  106. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement