Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Xml.Schema;
- namespace ToyStore
- {
- class Program
- {
- static void Main(string[] args)
- {
- double travelPrice = double.Parse(Console.ReadLine());
- int brSaw = int.Parse(Console.ReadLine());
- int brDoll = int.Parse(Console.ReadLine());
- int brBears = int.Parse(Console.ReadLine());
- int brMinions = int.Parse(Console.ReadLine());
- int brTrucks = int.Parse(Console.ReadLine());
- double prSaw = 2.60;
- double prDoll = 3.00;
- double prBears = 4.10;
- double prMinnionts = 8.20;
- double prTrucks = 2.00;
- int brtoys = brBears + brDoll + brMinions + brSaw + brTrucks;
- double total = (brDoll * prDoll + brBears * prBears + brSaw * prSaw + brTrucks * prTrucks + brMinions * prMinnionts);
- double totalAfterRent = total - total * 0.10;
- double left = totalAfterRent - travelPrice;
- double needed = travelPrice - totalAfterRent;
- if (brtoys >=50)
- totalAfterRent=totalAfterRent-0.25*totalAfterRent;
- if (travelPrice <= total)
- Console.WriteLine($"Yes! {left:f2} lv left.");
- else if (travelPrice > totalAfterRent)
- {
- Console.WriteLine($"Not enough money! {needed:f2} lv needed.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment