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 ConsoleApp1
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- double tripPrice = double.Parse(Console.ReadLine());
- int puzzles = int.Parse(Console.ReadLine());
- double puzzlePrice = 2.60;
- int talkingDolls = int.Parse(Console.ReadLine());
- int bears = int.Parse(Console.ReadLine());
- int minions = int.Parse(Console.ReadLine());
- int trucks = int.Parse(Console.ReadLine());
- int toysTotal = puzzles + talkingDolls + bears + minions + trucks;
- double orderPrice = puzzles * puzzlePrice + talkingDolls * 3 + bears * 4.10 + minions * 8.20 + trucks * 2;
- if (toysTotal >= 50)
- {
- orderPrice = orderPrice * 0.75;
- }
- double rent = orderPrice * 0.10;
- double myMoney = orderPrice - rent;
- if (myMoney >= tripPrice)
- {
- Console.WriteLine($"Yes! {myMoney - tripPrice:f2} lv left.");
- }
- else
- {
- Console.WriteLine($"Not enough money! {tripPrice - myMoney:f2} lv needed.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement