Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Mobile_operator
- {
- class Program
- {
- static void Main(string[] args)
- {
- string term = Console.ReadLine();
- string typeContract = Console.ReadLine();
- string internet = Console.ReadLine();
- double countMounth = double.Parse(Console.ReadLine());
- double tax = 0;
- if (term=="one")
- {
- if (typeContract=="Small")
- {
- tax = 9.98;
- }
- else if (typeContract == "Middle")
- {
- tax = 18.99;
- }
- else if (typeContract == "Large")
- {
- tax = 25.98;
- }
- else if (typeContract == "ExtraLarge")
- {
- tax = 35.99;
- }
- }
- if (term == "two")
- {
- if (typeContract == "Small")
- {
- tax = 8.58;
- }
- else if (typeContract == "Middle")
- {
- tax = 17.09;
- }
- else if (typeContract == "Large")
- {
- tax = 23.58;
- }
- else if (typeContract == "ExtraLarge")
- {
- tax = 31.79;
- }
- }
- if (internet=="yes")
- {
- if (tax<=10)
- {
- tax = tax + 5.50;
- }
- else if (tax<=30)
- {
- tax = tax + 4.35;
- }
- else if (tax>30)
- {
- tax = tax + 3.85;
- }
- }
- double price = (countMounth * tax);
- double discount = 0;
- if (term=="two")
- {
- discount= price * 0.0375;
- price = price - discount;
- }
- Console.WriteLine($"{price:f2} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment