Advertisement
Guest User

Untitled

a guest
Oct 18th, 2017
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 8.20 KB | None | 0 0
  1. using System;
  2.  
  3. public class Program
  4. {
  5.     public static void Main(string[] args)
  6.     {
  7.         string season = Console.ReadLine();
  8.         string group = Console.ReadLine();
  9.         int students = int.Parse(Console.ReadLine());
  10.         int days = int.Parse(Console.ReadLine());
  11.         double nightsPrice = 0;
  12.         double discount = 0;
  13.         double totalPrice = 0;
  14.        
  15.         if  ( season == "Winter" && group == "girls" )
  16.         {
  17.             Console.Write("Gymnastics ");
  18.        
  19.             if ( students >= 50 )
  20.             {
  21.                 nightsPrice = students * 9.60 * days;
  22.                 discount = 0.50 * nightsPrice;
  23.                 totalPrice = nightsPrice - discount;
  24.                 Console.Write("{0:f2} lv.", totalPrice);
  25.             }
  26.             else if ( students >= 20 && students < 50 )
  27.             {
  28.                 nightsPrice = students * 9.60 * days;
  29.                 discount = 0.15 * nightsPrice;
  30.                 totalPrice = nightsPrice - discount;
  31.                 Console.Write("{0:f2} lv.", totalPrice);
  32.             }
  33.             else if ( students >= 10 && students < 20 )
  34.             {
  35.                 nightsPrice = students * 9.60 * days;
  36.                 discount = 0.05 * nightsPrice;
  37.                 totalPrice = nightsPrice - discount;
  38.                 Console.Write("{0:f2} lv.", totalPrice);
  39.             }  
  40.             else
  41.             {
  42.                 nightsPrice = students * 9.60 * days;
  43.                 totalPrice = nightsPrice;
  44.                 Console.Write("{0:f2} lv.", totalPrice);
  45.             }
  46.         }
  47.         else if ( season == "Winter" && group == "boys" )
  48.         {
  49.             Console.Write("Judo ");
  50.             if ( students >= 50 )
  51.             {
  52.                 nightsPrice = students * 9.60 * days;
  53.                 discount = 0.50 * nightsPrice;
  54.                 totalPrice = nightsPrice - (0.50 * nightsPrice);
  55.                 Console.Write("{0:f2} lv.", totalPrice);
  56.             }
  57.             else if ( students >= 20 && students < 50 )
  58.             {
  59.                 nightsPrice = students * 9.60 * days;
  60.                 discount = 0.15 * nightsPrice;
  61.                 totalPrice = nightsPrice - discount;
  62.                 Console.Write("{0:f2} lv.", totalPrice);
  63.             }
  64.             else if ( students >= 10 && students < 20 )
  65.             {
  66.                 nightsPrice = students * 9.60 * days;
  67.                 discount = 0.05 * nightsPrice;
  68.                 totalPrice = nightsPrice - discount;
  69.                 Console.Write("{0:f2} lv.", totalPrice);
  70.             }  
  71.             else
  72.             {      
  73.                 nightsPrice = students * 9.60 * days;
  74.                 totalPrice = nightsPrice;
  75.                 Console.Write("{0:f2} lv.", totalPrice);
  76.             }
  77.         }
  78.         else if ( season == "Winter" && group == "mixed" )
  79.         {
  80.             Console.Write("Ski ");
  81.             if ( students >= 50 )
  82.             {
  83.                 nightsPrice = students * 10 * days;
  84.                 discount = 0.50 * nightsPrice;
  85.                 totalPrice = nightsPrice - discount;
  86.                 Console.Write("{0:f2} lv.", totalPrice);
  87.             }
  88.             else if ( students >= 20 && students < 50 )
  89.             {
  90.                 nightsPrice = students * 10 * days;
  91.                 discount = 0.15 * nightsPrice;
  92.                 totalPrice = nightsPrice - discount;
  93.                 Console.Write("{0:f2} lv.", totalPrice);
  94.             }
  95.             else if ( students >= 10 && students < 20 )
  96.             {
  97.                 nightsPrice = students * 10 * days;
  98.                 discount = 0.05 * nightsPrice;
  99.                 totalPrice = nightsPrice - discount;
  100.                 Console.Write("{0:f2} lv.", totalPrice);
  101.             }  
  102.             else
  103.             {      
  104.                 nightsPrice = students * 10 * days;
  105.                 totalPrice = nightsPrice;
  106.                 Console.Write("{0:f2} lv.", totalPrice);
  107.             }
  108.         }
  109.         else if ( season == "Spring" && group == "girls" )
  110.         {
  111.             Console.Write("Athletics ");
  112.             if ( students >= 50 )
  113.             {
  114.                 nightsPrice = students * 7.20 * days;
  115.                 discount = 0.50 * nightsPrice;
  116.                 totalPrice = nightsPrice - discount;
  117.                 Console.Write("{0:f2} lv.", totalPrice);
  118.             }
  119.             else if ( students >= 20 && students < 50 )
  120.             {
  121.                 nightsPrice = students * 7.20 * days;
  122.                 discount = 0.15 * nightsPrice;
  123.                 totalPrice = nightsPrice - discount;
  124.                 Console.Write("{0:f2} lv.", totalPrice);
  125.             }
  126.             else if ( students >= 10 && students < 20 )
  127.             {
  128.                 nightsPrice = students * 7.20 * days;
  129.                 discount = 0.05 * nightsPrice;
  130.                 totalPrice = nightsPrice - discount;
  131.                 Console.Write("{0:f2} lv.", totalPrice);
  132.             }  
  133.             else
  134.             {      
  135.                 nightsPrice = students * 7.20 * days;
  136.                 totalPrice = nightsPrice;
  137.                 Console.Write("{0:f2} lv.", totalPrice);
  138.             }
  139.         }
  140.         else if ( season == "Spring" && group == "boys" )
  141.         {
  142.             Console.Write("Tennis ");
  143.             if ( students >= 50 )
  144.             {
  145.                 nightsPrice = students * 7.20 * days;
  146.                 discount = 0.50 * nightsPrice;
  147.                 totalPrice = nightsPrice - discount;
  148.                 Console.Write("{0:f2} lv.", totalPrice);
  149.             }
  150.             else if ( students >= 20 && students < 50 )
  151.             {
  152.                 nightsPrice = students * 7.20 * days;
  153.                 discount = 0.15 * nightsPrice;
  154.                 totalPrice = nightsPrice - discount;
  155.                 Console.Write("{0:f2} lv.", totalPrice);
  156.             }
  157.             else if ( students >= 10 && students < 20 )
  158.             {
  159.                 nightsPrice = students * 7.20 * days;
  160.                 discount = 0.05 * nightsPrice;
  161.                 totalPrice = nightsPrice - discount;
  162.                 Console.Write("{0:f2} lv.", totalPrice);
  163.             }
  164.             else
  165.             {      
  166.                 nightsPrice = students * 7.20 * days;
  167.                 totalPrice = nightsPrice;
  168.                 Console.Write("{0:f2} lv.", totalPrice);
  169.             }
  170.         }
  171.         else if ( season == "Spring" && group == "mixed" )
  172.         {
  173.             Console.Write("Cycling ");
  174.             if ( students >= 50 )
  175.             {
  176.                 nightsPrice = students * 9.50 * days;
  177.                 discount = 0.50 * nightsPrice;
  178.                 totalPrice = nightsPrice - discount;
  179.                 Console.Write("{0:f2} lv.", totalPrice);
  180.             }
  181.             else if ( students >= 20 && students < 50 )
  182.             {
  183.                 nightsPrice = students * 9.50 * days;
  184.                 discount = 0.15 * nightsPrice;
  185.                 totalPrice = nightsPrice - discount;
  186.                 Console.Write("{0:f2} lv.", totalPrice);
  187.             }
  188.             else if ( students >= 10 && students < 20 )
  189.             {
  190.                 nightsPrice = students * 9.50 * days;
  191.                 discount = 0.05 * nightsPrice;
  192.                 totalPrice = nightsPrice - discount;
  193.                 Console.Write("{0:f2} lv.", totalPrice);
  194.             }
  195.             else
  196.             {      
  197.                 nightsPrice = students * 9.50 * days;
  198.                 totalPrice = nightsPrice;
  199.                 Console.Write("{0:f2} lv.", totalPrice);
  200.             }
  201.         }
  202.         else if ( season == "Summer" && group == "girls" )
  203.         {
  204.             Console.Write("Volleyball ");
  205.             if ( students >= 50 )
  206.             {
  207.                 nightsPrice = students * 15 * days;
  208.                 discount = 0.50 * nightsPrice;
  209.                 totalPrice = nightsPrice - discount;
  210.                 Console.Write("{0:f2} lv.", totalPrice);
  211.             }
  212.             else if ( students >= 20 && students < 50 )
  213.             {
  214.                 nightsPrice = students * 15 * days;
  215.                 discount = 0.15 * nightsPrice;
  216.                 totalPrice = nightsPrice - discount;
  217.                 Console.Write("{0:f2} lv.", totalPrice);
  218.             }
  219.             else if ( students >= 10 && students < 20 )
  220.             {
  221.                 nightsPrice = students * 15 * days;
  222.                 discount = 0.05 * nightsPrice;
  223.                 totalPrice = nightsPrice - discount;
  224.                 Console.Write("{0:f2} lv.", totalPrice);
  225.             }
  226.             else
  227.             {      
  228.                 nightsPrice = students * 15 * days;
  229.                 totalPrice = nightsPrice;
  230.                 Console.Write("{0:f2} lv.", totalPrice);
  231.             }
  232.         }
  233.         else if ( season == "Summer" && group == "boys" )
  234.         {
  235.             Console.Write("Football ");
  236.             if ( students >= 50 )
  237.             {
  238.                 nightsPrice = students * 15 * days;
  239.                 discount = 0.50 * nightsPrice;
  240.                 totalPrice = nightsPrice - discount;
  241.                 Console.Write("{0:f2} lv.", totalPrice);
  242.             }
  243.             else if ( students >= 20 && students < 50 )
  244.             {
  245.                 nightsPrice = students * 15 * days;
  246.                 discount = 0.15 * nightsPrice;
  247.                 totalPrice = nightsPrice - discount;
  248.                 Console.Write("{0:f2} lv.", totalPrice);
  249.             }
  250.             else if ( students >= 10 && students < 20 )
  251.             {
  252.                 nightsPrice = students * 15 * days;
  253.                 discount = 0.05 * nightsPrice;
  254.                 totalPrice = nightsPrice - discount;
  255.                 Console.Write("{0:f2} lv.", totalPrice);
  256.             }
  257.             else
  258.             {      
  259.                 nightsPrice = students * 15 * days;
  260.                 totalPrice = nightsPrice;
  261.                 Console.Write("{0:f2} lv.", totalPrice);
  262.             }
  263.         }
  264.         else if ( season == "Summer" && group == "mixed" )
  265.         {
  266.             Console.Write("Swimming ");
  267.             if ( students >= 50 )
  268.             {
  269.                 nightsPrice = students * 20 * days;
  270.                 discount = 0.50 * nightsPrice;
  271.                 totalPrice = nightsPrice - discount;
  272.                 Console.Write("{0:f2} lv.", totalPrice);
  273.             }
  274.             else if ( students >= 20 && students < 50 )
  275.             {
  276.                 nightsPrice = students * 20 * days;
  277.                 discount = 0.15 * nightsPrice;
  278.                 totalPrice = nightsPrice - discount;
  279.                 Console.Write("{0:f2} lv.", totalPrice);
  280.             }
  281.             else if ( students >= 10 && students < 20 )
  282.             {
  283.                 nightsPrice = students * 20 * days;
  284.                 discount = 0.05 * nightsPrice;
  285.                 totalPrice = nightsPrice - discount;
  286.                 Console.Write("{0:f2} lv.", totalPrice);
  287.             }
  288.             else
  289.             {      
  290.                 nightsPrice = students * 20 * days;
  291.                 totalPrice = nightsPrice;
  292.                 Console.Write("{0:f2} lv.", totalPrice);
  293.             }
  294.         }
  295.     }
  296. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement