Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace exampreparation
- {
- class exam
- {
- static void Main(string[] args)
- {
- string duration = Console.ReadLine();
- string contract = Console.ReadLine();
- string mobileNet = Console.ReadLine();
- int months = int.Parse(Console.ReadLine());
- double price = 0.0;
- if (duration == "one")
- {
- if (contract == "Small")
- {
- price = 9.98;
- }
- else if (contract == "Middle")
- {
- price = 18.99;
- }
- else if (contract == "Large")
- {
- price = 25.98;
- }
- else
- {
- price = 35.99;
- }
- }
- else
- {
- if (contract == "Small")
- {
- price = 8.58;
- }
- else if (contract == "Middle")
- {
- price = 17.09;
- }
- else if (contract == "Large")
- {
- price = 23.59;
- }
- else
- {
- price = 31.79;
- }
- }
- if (mobileNet == "yes")
- {
- if (price <= 10)
- {
- price += 5.50;
- }
- else if (price <= 30)
- {
- price += 4.35;
- }
- else
- {
- price += 3.85;
- }
- }
- double bill = price * months;
- if (duration == "two")
- {
- bill *= 0.9625;
- }
- Console.WriteLine($"{bill:f2} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement