Anzzhhela98

хгхг

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