Advertisement
KlimentHristov

01.ProspectInHospitality

Nov 11th, 2015
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.51 KB | None | 0 0
  1. using System;
  2. class ProspectInHospitality
  3. {
  4.     static void Main()
  5.     {
  6.         decimal builders = decimal.Parse(Console.ReadLine());
  7.         builders = builders * 1500.04m;
  8.         decimal receptionists = decimal.Parse(Console.ReadLine());
  9.         receptionists = receptionists * 2102.10m;
  10.         decimal chambermaids = decimal.Parse(Console.ReadLine());
  11.         chambermaids = chambermaids * 1465.46m;
  12.  
  13.         decimal technicians = decimal.Parse(Console.ReadLine());
  14.         technicians = technicians * 2053.33m;
  15.  
  16.         decimal otherStaff = decimal.Parse(Console.ReadLine());
  17.         otherStaff = otherStaff * 3010.98m;
  18.  
  19.         decimal nikiSalaryUSD = decimal.Parse(Console.ReadLine());
  20.         decimal currencyRateUSA = decimal.Parse(Console.ReadLine());
  21.  
  22.         decimal yourSalary = decimal.Parse(Console.ReadLine());
  23.         decimal budget = decimal.Parse(Console.ReadLine());
  24.  
  25.         nikiSalaryUSD = nikiSalaryUSD * currencyRateUSA;
  26.         decimal amountResult = builders + receptionists + chambermaids + technicians + otherStaff + nikiSalaryUSD + yourSalary;
  27.  
  28.         Console.WriteLine("The amount is: {0:F2} lv.", amountResult);
  29.         if (budget >= amountResult)
  30.         {
  31.             budget = budget - amountResult;
  32.             Console.WriteLine("YES \\ Left: {0:F2} lv.",budget);
  33.         }
  34.         else if(budget <= amountResult)
  35.         {
  36.             amountResult = amountResult - budget;
  37.             Console.WriteLine("NO \\ Need more: {0:F2} lv.", amountResult);
  38.         }
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement