Advertisement
viraco4a

01.Hearthstone

Mar 12th, 2018
404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. using System;
  2.  
  3. namespace FinalExam
  4. {
  5. class Program
  6. {
  7. static void Main()
  8. {
  9. int restTime = int.Parse(Console.ReadLine());
  10. double priceSinglePacket = double.Parse(Console.ReadLine());
  11. double adnventurePrice = double.Parse(Console.ReadLine());
  12. double coffeePrice = double.Parse(Console.ReadLine());
  13. double spentMoney = 0;
  14. spentMoney += coffeePrice + 3 * priceSinglePacket + 2 * adnventurePrice;
  15. int leftTime = restTime - (5 + 3 * 2 + 2 * 2);
  16. Console.WriteLine($"{spentMoney:F2}");
  17. Console.WriteLine(leftTime);
  18. }
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement