Spocoman

05. Godzilla vs. Kong

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