Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace GodzillavsKong
- {
- class MainClass
- {
- public static void Main(string[] args)
- {
- //input
- double budget = double.Parse(Console.ReadLine());
- int extra = int.Parse(Console.ReadLine());
- double outfitPrice = double.Parse(Console.ReadLine());
- //film decor 10% from budget
- //more than 150 extras, outfits are 10% off
- double decor = budget * 0.10;
- if (extra >= 150)
- {
- outfitPrice = outfitPrice - (outfitPrice * 0.10);
- }
- else
- {
- }
- double outfitSum = extra * outfitPrice;
- if (budget >= decor + outfitSum)
- {
- Console.WriteLine("Action!");
- double budgetLeft = budget - (decor + outfitSum);
- Console.WriteLine($"Wingard starts filming with {budgetLeft:F2} leva left.");
- }
- if (budget < decor + outfitSum)
- {
- Console.WriteLine("Not enough money!");
- double budgetLeft = Math.Abs(budget - (decor + outfitSum));
- Console.WriteLine($"Wingard needs {budgetLeft:F2} leva more.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement