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 Toy_Shop
- {
- class Program
- {
- static void Main(string[] args)
- {
- double excursia = double.Parse(Console.ReadLine());
- double puzzels = double.Parse(Console.ReadLine());
- double dolls = double.Parse(Console.ReadLine());
- double bears = double.Parse(Console.ReadLine());
- double minions = double.Parse(Console.ReadLine());
- double trucks = double.Parse(Console.ReadLine());
- double orderNr = puzzels + dolls + bears + minions + trucks;
- double orderPrice = (puzzels * 2.6 * 0.9) + (dolls * 3 * 0.9) + (bears * 4.1 * 0.9) + (minions * 8.2 * 0.9) + (trucks * 2 * 0.9);
- double orderTotalPrice = 0;
- if (orderNr >= 50)
- {
- orderTotalPrice = orderPrice * 0.75;
- }
- else
- {
- orderTotalPrice = orderPrice;
- }
- if (orderTotalPrice >= excursia)
- {
- Console.WriteLine($"Yes! {orderTotalPrice - excursia:f2} lv left.");
- }
- else
- {
- Console.WriteLine($"Not enough money! {Math.Abs(orderTotalPrice - excursia):f2} lv needed.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement