Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace beats
- {
- class Program
- {
- static void Main(string[] args)
- {
- var guests = double.Parse(Console.ReadLine());
- var budget = double.Parse(Console.ReadLine());
- var priceforKuvert = guests * 20;
- var lastMoney = budget - priceforKuvert;
- var moneyforFoeverki = lastMoney * 0.4;
- var moneyForKids = lastMoney - moneyforFoeverki;
- if (priceforKuvert < budget)
- {
- Console.WriteLine($"Yes! {Math.Round(moneyforFoeverki)} lv are for fireworks and {Math.Round(moneyForKids)} lv are for donation." );
- }
- if (priceforKuvert > budget)
- {
- var all = priceforKuvert - budget;
- Console.WriteLine($"They won't have enough money to pay the covert. They will need {Math.Round(all)} lv more.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment