Advertisement
EvgeniVT

Wedding Party

Nov 29th, 2018
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.61 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Wedding_Party
  4. {
  5.     class Program
  6.     {
  7.         static void Main()
  8.         {
  9.             var count = int.Parse(Console.ReadLine());
  10.             var bud = int.Parse(Console.ReadLine());
  11.             var price = count * 20;
  12.             var dif = bud - price;
  13.             if (dif >= 0)
  14.                 Console.WriteLine($"Yes! {Math.Round (dif * 0.4)} lv are for fireworks and {Math.Round(dif * 0.6)} lv are for donation.");
  15.             else
  16.                 Console.WriteLine($"They won't have enough money to pay the covert. They will need {price-bud} lv more.");
  17.         }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement