Advertisement
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 _02.Shirt
- {
- class Program
- {
- static void Main(string[] args)
- {
- double sleeve = double.Parse(Console.ReadLine());
- double front = double.Parse(Console.ReadLine());
- string fabric = Console.ReadLine();
- string tie = Console.ReadLine();
- double pricePerM = 0.0;
- double size = sleeve * 2 + front * 2;
- size += 0.10 * size;
- double sizeInM = size / 100;
- switch (fabric)
- {
- case "Linen":
- pricePerM = 15;
- break;
- case "Cotton":
- pricePerM = 12;
- break;
- case "Denim":
- pricePerM = 20;
- break;
- case "Twill":
- pricePerM = 16;
- break;
- case "Flannel":
- pricePerM = 11;
- break;
- default:
- break;
- }
- double price = pricePerM * sizeInM + 10;
- if (tie == "Yes")
- {
- price += 0.20 * price;
- }
- Console.WriteLine($"The price of the shirt is: {price:F2}lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement