Advertisement
Guest User

Untitled

a guest
Jan 14th, 2018
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.82 KB | None | 0 0
  1. using System;
  2.  
  3. namespace New_Years_Eve_Party
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int guests = int.Parse(Console.ReadLine());
  10.             int budget = int.Parse(Console.ReadLine());
  11.             int kuvert = 20;
  12.             if(guests * kuvert < budget)
  13.             {
  14.                 int ostatuk = budget - (guests * kuvert);
  15.                 double fireworks = ostatuk * 0.40;
  16.                 double donation = ostatuk * 0.60;
  17.                 Console.WriteLine("Yes! "+ fireworks +" lv are for fireworks and "+ donation +" lv are for donation.");
  18.             }
  19.             else
  20.             {
  21.                 Console.WriteLine("They won't have enough money to pay the covert. They will need " + ((guests * kuvert) - budget) + " lv more.");
  22.             }
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement