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.Mobile_operator
- {
- class Program
- {
- static void Main(string[] args)
- {
- string contract = Console.ReadLine();
- string typeContract = Console.ReadLine();
- string internet = Console.ReadLine();
- var month = int.Parse(Console.ReadLine());
- var sum = 0.0;
- if (contract == "one")
- {
- if (typeContract == "Small")
- {
- sum = 9.98;
- }
- else if (typeContract == "Middle")
- {
- sum = 18.99;
- }
- else if (typeContract == "Large")
- {
- sum = 25.98;
- }
- else if (typeContract == "ExtraLarge")
- {
- sum = 35.99;
- }
- }
- else if (internet == "yes")
- {
- if (sum <= 10)
- {
- sum += 5.50;
- }
- else if (sum >=10 && sum <= 30)
- {
- sum += 4.35;
- }
- else if (sum > 30)
- {
- sum += 3.85;
- }
- }
- else if (contract == "two")
- {
- if (typeContract == "Small")
- {
- sum = 8.58;
- }
- else if (typeContract == "Middle")
- {
- sum = 17.09;
- }
- else if (typeContract == "Large")
- {
- sum = 23.59;
- }
- else if (typeContract == "ExtraLarge")
- {
- sum = 31.79;
- }
- }
- else if (internet == "yes")
- {
- if (sum <= 10)
- {
- sum += 5.50;
- }
- else if (sum >= 10 && sum <= 30)
- {
- sum += 4.35;
- }
- else if (sum > 30)
- {
- sum += 3.85;
- }
- }
- sum *= 1 - 0.0375;
- var fullSum = sum * month;
- Console.WriteLine("{0:f2} lv.",fullSum);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment