Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace MobileOperator
- {
- using System;
- class MobileOperator
- {
- static void Main()
- {
- string term = Console.ReadLine().ToLower();
- string type = Console.ReadLine().ToLower();
- string internet = Console.ReadLine().ToLower();
- int n = int.Parse(Console.ReadLine());
- double monthlyFee = 0;
- if (term == "one")
- {
- if (type == "small") { monthlyFee = 9.98; }
- if (type == "middle") { monthlyFee = 18.99; }
- if (type == "large") { monthlyFee = 25.98; }
- if (type == "extralarge") { monthlyFee = 35.99; }
- }
- else
- {
- if (type == "small") { monthlyFee = 8.58; }
- if (type == "middle") { monthlyFee = 17.09; }
- if (type == "large") { monthlyFee = 23.59; }
- if (type == "extralarge") { monthlyFee = 31.79; }
- }
- if (internet == "yes")
- {
- monthlyFee +=
- monthlyFee <= 10 ? 5.50 :
- monthlyFee <= 30 ? 4.35 :
- 3.85;
- }
- if (term == "two") { monthlyFee *= (1 - 0.0375); }
- Console.WriteLine($"{monthlyFee * n:F2} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement