Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace newtry
- {
- class Program
- {
- static void Main(string[] args)
- {
- double budget = double.Parse(Console.ReadLine());
- double statsmen = double.Parse(Console.ReadLine());
- double clothesPrice = double.Parse(Console.ReadLine());
- double decorFee = (budget * 10) / 100;
- double clothesValue = statsmen * clothesPrice;
- double movieSum = 0;
- if (statsmen > 150)
- {
- double clothesDiscount = clothesValue - ((clothesValue * 10) / 100);
- movieSum = budget - (decorFee + clothesDiscount);
- }
- else if (statsmen < 150)
- {
- clothesValue = clothesValue * 1;
- movieSum = budget - (decorFee + clothesValue);
- }
- if (movieSum > budget)
- {
- Console.WriteLine("Not enough money!");
- Console.WriteLine($"Wingard needs ({ Math.Abs(movieSum-budget):F2}) leva more.");
- }
- else if (movieSum < budget)
- {
- Console.WriteLine("Action!");
- Console.WriteLine($"Wingard starts filming with { movieSum:F2} leva left.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement