Advertisement
Spocoman

Wedding Party

Oct 6th, 2023
678
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.66 KB | None | 0 0
  1. using System;
  2.  
  3. namespace WeddingParty
  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.  
  12.             budget -= guests * 20;
  13.  
  14.             if (budget < 0)
  15.             {
  16.                 Console.WriteLine($"They won't have enough money to pay the covert. They will need {Math.Abs(budget)} lv more.");
  17.             }
  18.             else
  19.             {
  20.                 Console.WriteLine($"Yes! {Math.Round(0.40 * budget)} lv are for fireworks and {Math.Round(0.60 * budget)} lv are for donation.");
  21.             }
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement