Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace SoftUniExamDekemwri2019_2._5
- {
- class Program
- {
- static void Main(string[] args)
- {
- string fruit = Console.ReadLine();
- string size = Console.ReadLine();
- int orderedSets = int.Parse(Console.ReadLine());
- var total = 0.0;
- var priceOfNum = 0.0;
- var priceOfSets = 0.0;
- if (fruit == "Watermelon")
- {
- if (size == "small")
- {
- priceOfNum = 56 * 2;
- priceOfSets = orderedSets * priceOfNum;
- if (priceOfSets >= 400 && priceOfSets <= 1000)
- {
- total = priceOfSets - (priceOfSets * 0.15);
- Console.WriteLine("{0:f2} lv.", total);
- }
- else
- {
- if (priceOfSets > 1000)
- {
- total = priceOfSets - (priceOfSets * 0.5);
- Console.WriteLine("{0:f2} lv.", total);
- }
- else
- {
- if (priceOfSets < 400)
- {
- total = orderedSets * priceOfNum;
- Console.WriteLine("{0:f2} lv.", total);
- }
- }
- }
- }
- else
- {
- if (size == "big")
- {
- priceOfNum = 28.70 * 5;
- priceOfSets = orderedSets * priceOfNum;
- if (priceOfSets >= 400 && priceOfSets <= 1000)
- {
- total = priceOfSets - (priceOfSets * 0.15);
- Console.WriteLine("{0:f2} lv.", total);
- }
- else
- {
- if (priceOfSets > 1000)
- {
- total = priceOfSets - (priceOfSets * 0.5);
- Console.WriteLine("{0:f2} lv.", total);
- }
- else
- {
- if (priceOfSets < 400)
- {
- total = orderedSets * priceOfNum;
- Console.WriteLine("{0:f2} lv.", total);
- }
- }
- }
- }
- }
- }
- else
- {
- if (fruit == "Mango")
- {
- if (size == "small")
- {
- priceOfNum = 36.66 * 2;
- priceOfSets = orderedSets * priceOfNum;
- if (priceOfSets >= 400 && priceOfSets <= 1000)
- {
- total = priceOfSets - (priceOfSets * 0.15);
- Console.WriteLine("{0:f2} lv.", total);
- }
- else
- {
- if (priceOfSets > 1000)
- {
- total = priceOfSets - (priceOfSets * 0.5);
- Console.WriteLine("{0:f2} lv.", total);
- }
- else
- {
- if (priceOfSets < 400)
- {
- total = orderedSets * priceOfNum;
- Console.WriteLine("{0:f2} lv.", total);
- }
- }
- }
- }
- else
- {
- if (size == "big")
- {
- priceOfNum = 19.60 * 5;
- priceOfSets = orderedSets * priceOfNum;
- if (priceOfSets >= 400 && priceOfSets <= 1000)
- {
- total = priceOfSets - (priceOfSets * 0.15);
- Console.WriteLine("{0:f2} lv.", total);
- }
- else
- {
- if (priceOfSets > 1000)
- {
- total = priceOfSets - (priceOfSets * 0.5);
- Console.WriteLine("{0:f2} lv.", total);
- }
- else
- {
- if (priceOfSets < 400)
- {
- total = orderedSets * priceOfNum;
- Console.WriteLine("{0:f2} lv.", total);
- }
- }
- }
- }
- }
- }
- else
- {
- if (fruit == "Pineapple")
- {
- if (size == "small")
- {
- priceOfNum = 42.10 * 2;
- priceOfSets = orderedSets * priceOfNum;
- if (priceOfSets >= 400 && priceOfSets <= 1000)
- {
- total = priceOfSets - (priceOfSets * 0.5);
- Console.WriteLine("{0:f2} lv.", total);
- }
- else
- {
- if (priceOfSets > 1000)
- {
- total = priceOfSets - (priceOfSets * 0.5);
- Console.WriteLine("{0:f2} lv.", total);
- }
- else
- {
- if (priceOfSets < 400)
- {
- total = orderedSets * priceOfNum;
- Console.WriteLine("{0:f2} lv.", total);
- }
- }
- }
- }
- else
- {
- if (size == "big")
- {
- priceOfNum = 24.80 * 5;
- priceOfSets = orderedSets * priceOfNum;
- if (priceOfSets >= 400 && priceOfSets <= 1000)
- {
- total = priceOfSets - (priceOfSets * 0.5);
- Console.WriteLine("{0:f2} lv.", total);
- }
- else
- {
- if (priceOfSets > 1000)
- {
- total = priceOfSets - (priceOfSets * 0.5);
- Console.WriteLine("{0:f2} lv.", total);
- }
- else
- {
- if (priceOfSets < 400)
- {
- total = orderedSets * priceOfNum;
- Console.WriteLine("{0:f2} lv.", total);
- }
- }
- }
- }
- }
- }
- else
- {
- if (fruit == "Raspberry")
- {
- if (size == "small")
- {
- priceOfNum = 20 * 2;
- priceOfSets = orderedSets * priceOfNum;
- if (priceOfSets >= 400 && priceOfSets <= 1000)
- {
- total = priceOfSets - (priceOfSets * 0.5);
- Console.WriteLine("{0:f2} lv.", total);
- }
- else
- {
- if (priceOfSets > 1000)
- {
- total = priceOfSets - (priceOfSets * 0.5);
- Console.WriteLine("{0:f2} lv.", total);
- }
- else
- {
- if (priceOfSets < 400)
- {
- total = orderedSets * priceOfNum;
- Console.WriteLine("{0:f2} lv.", total);
- }
- }
- }
- }
- else
- {
- if (size == "big")
- {
- priceOfNum = 15.20 * 5;
- priceOfSets = orderedSets * priceOfNum;
- if (priceOfSets >= 400 && priceOfSets <= 1000)
- {
- total = priceOfSets - (priceOfSets * 0.5);
- Console.WriteLine("{0:f2} lv.", total);
- }
- else
- {
- if (priceOfSets > 1000)
- {
- total = priceOfSets - (priceOfSets * 0.5);
- Console.WriteLine("{0:f2} lv.", total);
- }
- else
- {
- if (priceOfSets < 400)
- {
- total = orderedSets * priceOfNum;
- Console.WriteLine("{0:f2} lv.", total);
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement