Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace GodzillaVsKong
- {
- class Program
- {
- static void Main(string[] args)
- {
- double budget = double.Parse(Console.ReadLine());
- int actors = int.Parse(Console.ReadLine());
- double clothesPerActor = double.Parse(Console.ReadLine());
- double decore = budget * 0.10;
- double totalClothes = 0;
- if (actors <= 150)
- {
- totalClothes = actors * clothesPerActor;
- }
- else if (actors > 150)
- {
- totalClothes = actors * clothesPerActor * 0.90;
- }
- double totalCost = decore + totalClothes;
- if (totalCost > budget)
- {
- Console.WriteLine("Not enough money!");
- Console.WriteLine($"Wingard needs {(totalCost - budget):f2} leva more.");
- }
- else if (totalCost <= budget)
- {
- Console.WriteLine("Action!");
- Console.WriteLine($"Wingard starts filming with {(budget - totalCost):f2} leva left.");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment