Advertisement
Sim0o0na

01. Hearthstone

Mar 12th, 2018
18,111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.88 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace P01
  8. {
  9.     class Hearthstone
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int time = int.Parse(Console.ReadLine());
  14.             double pricePerDeck = double.Parse(Console.ReadLine());
  15.             double coffePrice = double.Parse(Console.ReadLine());
  16.             double priceOfAdventure = double.Parse(Console.ReadLine());
  17.  
  18.             int timeForCoffe = 5;
  19.             int timeToBuyDeck = 6;
  20.             int timeToBueAdventure = 4;
  21.             int timeToBreak = time - (timeToBueAdventure + timeToBuyDeck + timeForCoffe);
  22.             double moneyLeft = (3 * pricePerDeck) + (2 * coffePrice) + priceOfAdventure;
  23.  
  24.             Console.WriteLine($"{moneyLeft:f2}");
  25.             Console.WriteLine(timeToBreak);
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement