Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int puzzles = int.Parse(Console.ReadLine());
- int doll = int.Parse(Console.ReadLine());
- int bear = int.Parse(Console.ReadLine());
- int minion = int.Parse(Console.ReadLine());
- int trycks = int.Parse(Console.ReadLine());
- double priceToys = puzzles * 2.60 + doll * 3.0 + bear * 4.10 + minion * 8.20 + trycks * 2.0;
- double sumToys = puzzles + doll + bear + minion + trycks;
- if(sumToys >= 50)
- {
- priceToys=priceToys- (priceToys *=0.25);
- }
- double rent = priceToys * 0.10;
- double result = priceToys - rent;
- if (result >= holiday)
- {
- Console.WriteLine($"Yes! {result - holiday:f2} lv left.");
- }
- else
- {
- Console.WriteLine($"Not enough money! {Math.Abs(result-holiday):f2} lv needed.");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement