Advertisement
Guest User

01. Hearthstone

a guest
Jul 15th, 2018
3,196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _01.Hearthstone
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int breakMinutes = int.Parse(Console.ReadLine());
  10. double packetCardsPrise = double.Parse(Console.ReadLine());
  11. double adventurePrise = double.Parse(Console.ReadLine());
  12. double coffeePrise = double.Parse(Console.ReadLine());
  13.  
  14. int breakMinutesWithoutCoffeTime = breakMinutes - 5;
  15. int timeForCards = 3 * 2;
  16. int timeForAdventure = 2 * 2;
  17.  
  18. int remainingTime = breakMinutesWithoutCoffeTime - (timeForCards + timeForAdventure);
  19. double moneyForPacks = 3 * packetCardsPrise;
  20. double moneyForAdventure = 2 * adventurePrise;
  21.  
  22. double allSpentMoney = moneyForPacks + moneyForAdventure + coffeePrise;
  23.  
  24. Console.WriteLine($"{allSpentMoney:F2}");
  25. Console.WriteLine($"{remainingTime}");
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement