M0Hk

GodzillaVsKong

Feb 18th, 2020
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.03 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _06.GodzillaVsKong
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double budget = double.Parse(Console.ReadLine());
  10.             int statists = int.Parse(Console.ReadLine());
  11.             double pricePerStatist = double.Parse(Console.ReadLine());
  12.  
  13.             double priceDecor = budget * 0.1;
  14.             double priceClothes = statists * pricePerStatist;
  15.  
  16.             if (statists > 150)
  17.             {
  18.                 priceClothes = priceClothes - 0.1 * priceClothes;
  19.             }
  20.             double total = priceDecor + priceClothes;
  21.             if (total > budget)
  22.             {
  23.                 Console.WriteLine("Not enough money!");
  24.                 Console.WriteLine($"Wingard needs {total - budget:F2} leva more.");
  25.             }
  26.             else
  27.             {
  28.                 Console.WriteLine("Action!");
  29.                 Console.WriteLine($"Wingard starts filming with {budget - total:F2} leva left.");
  30.             }
  31.            
  32.         }
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment