Advertisement
tsvetelinapasheva

TsvetelinaPasheva/ConditionalStatementsExercise/06.GodzillaVSKong

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