Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Globalization;
- using System.Linq;
- using System.Threading.Tasks;
- namespace ConsoleApplication3
- {
- class Program
- {
- static void Main(string[] args)
- {
- var DurationOfContract = Console.ReadLine();
- var TypeOfContract = Console.ReadLine();
- var AddedInternet = Console.ReadLine();
- int PayingMonths = int.Parse(Console.ReadLine());
- double price=0;
- if (DurationOfContract == "one")
- {
- if (TypeOfContract == "Small")
- {
- if(AddedInternet=="yes")
- {
- price = (9.98 + 5.50) * PayingMonths;
- Console.WriteLine("{0:f2} lv.",price);
- }
- else if (AddedInternet == "no")
- {
- price = 9.98 * PayingMonths;
- Console.WriteLine("{0:f2} lv.", price);
- }
- }
- else if (TypeOfContract == "Middle")
- {
- if (AddedInternet == "yes")
- {
- price = (18.99 + 4.35) * PayingMonths;
- Console.WriteLine("{0:f2} lv.", price);
- }
- else if (AddedInternet == "no")
- {
- price = 18.99 * PayingMonths;
- Console.WriteLine("{0:f2} lv.", price);
- }
- }
- else if (TypeOfContract == "Large")
- {
- if (AddedInternet == "yes")
- {
- price = (25.98 + 4.35) * PayingMonths;
- Console.WriteLine("{0:f2} lv.", price);
- }
- else if (AddedInternet == "no")
- {
- price = 25.98 * PayingMonths;
- Console.WriteLine("{0:f2} lv.", price);
- }
- }
- else if (TypeOfContract == "ExtraLarge")
- {
- if (AddedInternet == "yes")
- {
- price= (35.99 + 3.85) * PayingMonths;
- Console.WriteLine("{0:f2} lv.", price);
- }
- else if (AddedInternet == "no")
- {
- price = 35.99 * PayingMonths;
- Console.WriteLine("{0:f2} lv.", price);
- }
- }
- }
- if (DurationOfContract == "two")
- {
- if (TypeOfContract == "Small")
- {
- if(AddedInternet == "yes")
- {
- price = (8.58+5.50)* PayingMonths;
- price = price - price * 0.0375;
- Console.WriteLine("{0:f2} lv.", price);
- }
- else if (AddedInternet == "no")
- {
- price= 8.58 * PayingMonths;
- price = price - price * 0.0375;
- Console.WriteLine("{0:f2} lv.", price);
- }
- }
- else if (TypeOfContract == "Middle")
- {
- if (AddedInternet == "yes")
- {
- price = (17.09+4.35)* PayingMonths;
- price = price - price * 0.0375;
- Console.WriteLine("{0:f2} lv.", price);
- }
- else if (AddedInternet == "no")
- {
- price = 17.09 * PayingMonths;
- price= price - price * 0.0375;
- Console.WriteLine("{0:f2} lv.", price);
- }
- }
- else if (TypeOfContract == "Large")
- {
- if (AddedInternet == "yes")
- {
- price= (23.59+4.35) * PayingMonths;
- price = price - price * 0.0375;
- Console.WriteLine("{0:f2} lv.", price);
- }
- else if (AddedInternet == "no")
- {
- price = 23.59 * PayingMonths;
- price= price - price * 0.0375;
- Console.WriteLine("{0:f2} lv.", price);
- }
- }
- else if (TypeOfContract == "ExtraLarge")
- {
- if (AddedInternet == "yes")
- {
- price= (31.79+3.85) * PayingMonths;
- price = price - price * 0.0375;
- Console.WriteLine("{0:f2} lv.", price);
- }
- else if (AddedInternet == "no")
- {
- price = 31.79 * PayingMonths;
- price = price - price * 0.0375;
- Console.WriteLine("{0:f2} lv.", price);
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment