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;
- using System.Threading.Tasks;
- namespace _03_MobileOperator
- {
- class Program
- {
- static void Main(string[] args)
- {
- string time = Console.ReadLine().ToLower();
- string contract = Console.ReadLine().ToLower();
- string internet = Console.ReadLine().ToLower();
- int months = int.Parse(Console.ReadLine());
- double sum = 0.0;
- if (time == "one")
- {
- switch (contract)
- {
- case "small":
- sum += 9.98;
- break;
- case "middle":
- sum += 18.99;
- break;
- case "large":
- sum += 25.98;
- break;
- case "extralarge":
- sum += 35.99;
- break;
- }
- if (internet == "yes")
- {
- if (sum <= 10.00)
- {
- sum += 5.50;
- }
- else if (sum > 10 && sum <= 30.00)
- {
- sum += 4.35;
- }
- else
- {
- sum += 3.85;
- }
- }
- }
- else
- {
- switch (contract)
- {
- case "small":
- sum += 8.58;
- break;
- case "middle":
- sum += 17.09;
- break;
- case "large":
- sum += 23.59;
- break;
- case "extralarge":
- sum += 31.79;
- break;
- }
- if (internet == "yes")
- {
- if (sum <= 10.00)
- {
- sum += 5.50;
- }
- else if (sum > 10 && sum <= 30.00)
- {
- sum += 4.35;
- }
- else
- {
- sum += 3.85;
- }
- }
- sum -= sum * 0.0375;
- }
- sum *= months;
- Console.WriteLine($"{sum:F2} lv.");
- }
- }
- }
Add Comment
Please, Sign In to add comment