Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace EasterParty
- {
- class Program
- {
- static void Main(string[] args)
- {
- int guest = int.Parse(Console.ReadLine());
- double envelope = double.Parse(Console.ReadLine());
- double budget = double.Parse(Console.ReadLine());
- double sum = guest * envelope;
- if (guest >= 10 && guest <=15)
- {
- sum *= 0.85;
- }
- else if (guest > 15 && guest <= 20)
- {
- sum *= 0.8;
- }
- else if (guest > 20)
- {
- sum *= 0.75;
- }
- sum += budget / 10;
- if (budget >= sum)
- {
- Console.WriteLine($"It is party time! {budget - sum:F2} leva left.");
- }
- else
- {
- Console.WriteLine($"No party! {sum - budget:F2} leva needed.");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment