Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace MobileOperator
- {
- class Program
- {
- static void Main(string[] args)
- {
- string year = Console.ReadLine();
- string type = Console.ReadLine();
- string net = Console.ReadLine();
- int month = int.Parse(Console.ReadLine());
- double sum = 0;
- switch (type)
- {
- case "Small":
- if (year == "one")
- {
- sum += 9.98;
- }
- else
- {
- sum += 8.58;
- }
- break;
- case "Middle":
- if (year == "one")
- {
- sum += 18.99;
- }
- else
- {
- sum += 17.09;
- }
- break;
- case "Large":
- if (year == "one")
- {
- sum += 25.98;
- }
- else
- {
- sum += 23.59;
- }
- break;
- case "ExtraLarge":
- if (year == "one")
- {
- sum += 35.99;
- }
- else
- {
- sum += 31.79;
- }
- break;
- }
- if (net == "yes")
- {
- if (sum <= 10)
- {
- sum += 5.5;
- }
- else if (sum > 10 && sum <= 30)
- {
- sum += 4.35;
- }
- else
- {
- sum += 3.85;
- }
- }
- double total = sum * month;
- if (year == "two")
- {
- total -= 3.75 * total / 100;
- }
- Console.WriteLine($"{total:F2} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement