Advertisement
amorr

06_GodzilaVsKong

Jun 14th, 2021
790
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.12 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _06_GodzilaVsKong
  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 priceClothes1stat = double.Parse(Console.ReadLine());
  12.  
  13.             double priceDecore = budget * 0.1;
  14.             double priceClothes = statists * priceClothes1stat;
  15.             if (statists>150)
  16.             {
  17.                 priceClothes = priceClothes - priceClothes * 0.1;
  18.             }
  19.             if ((priceDecore+priceClothes)>budget)
  20.             {
  21.                 double shortmoney = priceDecore + priceClothes - budget;
  22.                 Console.WriteLine("Not enough money!");
  23.                 Console.WriteLine($"Wingard needs {shortmoney:F2} leva more.");
  24.             }
  25.             else
  26.             {
  27.                 double extramoney = budget - priceDecore - priceClothes;
  28.                 Console.WriteLine("Action!");
  29.                 Console.WriteLine($"Wingard starts filming with {extramoney:F2} leva left.");
  30.             }
  31.         }
  32.     }
  33. }
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement