Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Резервоар_за_гориво2
- {
- class Program
- {
- static void Main(string[] args)
- {
- string type = Console.ReadLine();
- int quantityType = int.Parse(Console.ReadLine());
- string card = Console.ReadLine();
- double price = 0;
- if (type == "Gas")
- {
- price = quantityType * 0.93;
- if (card == "Yes")
- {
- price = quantityType * 0.85;
- }
- }
- else if (type == "Gasoline")
- {
- price = quantityType * 2.22;
- if (card == "Yes")
- {
- price = quantityType * 2.04;
- }
- }
- else if (type == "Diesel")
- {
- price = quantityType * 2.33;
- if (card == "Yes")
- {
- price = quantityType * 2.11;
- }
- }
- if (quantityType >= 20 && quantityType <= 25)
- {
- price = price - (price * 0.08);
- }
- if (quantityType > 25)
- {
- price = price - (price * 0.1);
- }
- Console.WriteLine($"{price:f2} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment