Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace tESt
- {
- class Program
- {
- static void Main(string[] args)
- {
- var guests = int.Parse(Console.ReadLine());
- var budget = double.Parse(Console.ReadLine());
- var ticketsPrice = guests * 20; //400
- var diff = budget - ticketsPrice; // 600
- var fireworks = diff * 0.40; // = 240 лв
- var donation = diff - fireworks;
- if (diff >= 0)
- {
- Console.WriteLine($"Yes! {fireworks:f0} lv are for fireworks and {donation:f0} lv are for donation. ");
- }
- else
- {
- diff = Math.Abs(diff);
- Console.WriteLine($"They won't have enough money to pay the covert. They will need {diff:f0} lv more.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement