Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp10
- {
- class Program
- {
- static void Main(string[] args)
- {
- double holidayPrice = double.Parse(Console.ReadLine());
- int numPuzzle = int.Parse(Console.ReadLine());
- int numDoll = int.Parse(Console.ReadLine());
- int numBears = int.Parse(Console.ReadLine());
- int numMinion = int.Parse(Console.ReadLine());
- int numTrucks = int.Parse(Console.ReadLine());
- double totalInCome = numPuzzle * 2.60 + numDoll * 3 + numBears * 4.10 + numMinion * 8.20 + numTrucks * 2;
- int numOfToys = numPuzzle + numDoll + numBears + numMinion + numTrucks;
- if (numOfToys >= 50)
- {
- totalInCome = totalInCome - totalInCome * 0.25;
- }
- totalInCome -= totalInCome * 0.10;
- if (totalInCome >= holidayPrice)
- {
- Console.WriteLine($"Yes! {totalInCome - holidayPrice:f2} lv left.");
- }
- else
- {
- Console.WriteLine($"Not enough money! {holidayPrice - totalInCome:f2} lv needed.");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment