Advertisement
knikolov98

Untitled

Sep 11th, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.05 KB | None | 0 0
  1. using System;
  2.  
  3. namespace king_kong_ching_chong
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double budget = double.Parse(Console.ReadLine());
  10.             int numStat = int.Parse(Console.ReadLine());
  11.             double outfitStat = double.Parse(Console.ReadLine());
  12.  
  13.  
  14.             double decor = budget * 0.1;
  15.  
  16.             if (numStat >= 150)
  17.  
  18.             {
  19.                 outfitStat = outfitStat - (outfitStat * 0.1);
  20.             }
  21.  
  22.           double  total = numStat * Math.Abs(outfitStat) + decor;
  23.  
  24.             if (total <= budget)
  25.             {
  26.                 double exit = budget - total;
  27.  
  28.                 Console.WriteLine("Action!");
  29.                 Console.WriteLine($"Wingard starts filming with {exit:f2} leva left.");
  30.             }
  31.  
  32.  
  33.             else
  34.             {
  35.  
  36.                 double exit = total - budget;
  37.                 Console.WriteLine("Not enough money!");
  38.                 Console.WriteLine($"Wingard needs {exit:f2} leva more.");
  39.  
  40.             }
  41.         }
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement