Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace benzin
- {
- class Program
- {
- static void Main(string[] args)
- {
- double Price;
- Console.WriteLine("Введите объем");
- int Oil = int.Parse(Console.ReadLine());
- Console.WriteLine("Марка бензина");
- string Type = Console.ReadLine();
- Console.WriteLine("Есть карта? Скидка 10% Y or N");
- string input = Console.ReadLine();
- bool case1 = input.Contains("Y");
- bool case2 = input.Contains("N");
- if (case1)
- if (Type == "92")
- {
- Price = Oil * 30.92;
- Console.Write(Price);
- }
- if (Type == "95")
- {
- Price = Oil * 32.77;
- Console.Write(Price);
- }
- if (Type == "98")
- {
- Price = Oil * 36.34;
- Console.Write(Price);
- }
- else
- {
- if (Type == "92")
- {
- Price = ((Oil * 30.92) - (Oil * 30.92)*0.1) ;
- Console.Write(Price);
- }
- if (Type == "95")
- {
- Price = ((Oil * 32.77) - (Oil * 32.77)*0.1);
- Console.Write(Price);
- }
- if (Type == "98")
- {
- Price = - ((Oil * 36.34) -(Oil * 36.34)*0.1);
- Console.Write(Price);
- }
- }
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement