Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace HelloSoftUni
- {
- class Program
- {
- static void Main(string[] args)
- {
- double trip = double.Parse(Console.ReadLine());
- int puzzles = int.Parse(Console.ReadLine());
- int talkingDoll = int.Parse(Console.ReadLine());
- int teddyBear = int.Parse(Console.ReadLine());
- int minions = int.Parse(Console.ReadLine());
- int miniTruck = int.Parse(Console.ReadLine());
- double cost = puzzles * 2.6 + talkingDoll * 3 + teddyBear * 4.1 + minions * 8.2 + miniTruck * 2;
- if (talkingDoll + teddyBear + minions + miniTruck >= 50)
- { cost = cost * 0.75; }
- double pseudoProfit = cost * 0.9; ;
- if (pseudoProfit >= trip)
- {
- Console.WriteLine($"Yes! {(pseudoProfit - trip):F2} lv left.");
- }
- else
- {
- Console.WriteLine($"Not enough money! {(trip - pseudoProfit):F2} lv needed.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment