Advertisement
silvana1303

godzilla

Mar 20th, 2020
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.25 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace TrainingLab
  7. {
  8.     class TrainingLab
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             var budget = double.Parse(Console.ReadLine());
  13.             var statists = int.Parse(Console.ReadLine());
  14.             var costums = double.Parse(Console.ReadLine());
  15.  
  16.             var decor = budget * 0.10;
  17.             double sumcost = 0.0;
  18.            
  19.             if (statists <= 150)
  20.             {
  21.                 sumcost = statists * costums;
  22.             }
  23.             else
  24.             {
  25.                 sumcost = statists * costums - ((statists * costums) * 0.10);
  26.             }
  27.  
  28.             var movie = decor + sumcost;
  29.             var rest = budget - movie;
  30.             var need = budget - movie;
  31.  
  32.             if (movie <= budget)
  33.             {
  34.                 Console.WriteLine("Action!");
  35.                 Console.WriteLine("Wingard starts filming with {0:f2} leva left", rest);
  36.             }
  37.             else
  38.             {
  39.                 Console.WriteLine("Not enough money!");
  40.                 Console.WriteLine("Wingard needs {0:f2} leva more.", Math.Abs(need));
  41.             }
  42.         }
  43.     }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement