VickSuna

Untitled

Feb 18th, 2020
77
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace _337_Flower_Shop
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int numMagnolii = int.Parse(Console.ReadLine());
  10. int numZumbuli = int.Parse(Console.ReadLine());
  11. int numeRozi = int.Parse(Console.ReadLine());
  12. int numKaktusi = int.Parse(Console.ReadLine());
  13. double pricePresent = double.Parse(Console.ReadLine());
  14.  
  15. double priceMagnolii = 3.25;
  16. double priceZumbuli = 4.00;
  17. double priceRozi = 3.50;
  18. double priceKaktusi = 8.00;
  19.  
  20. double Prihod = ((numMagnolii * priceMagnolii) + (numZumbuli * priceZumbuli) + (numeRozi * priceRozi) + (numKaktusi * priceKaktusi)) * 0.95;
  21. // Console.WriteLine(Prihod);
  22. if (Prihod >= pricePresent)
  23. {
  24. double ostatyk = Math.Floor(Prihod - pricePresent);
  25. Console.WriteLine($"She is left with {ostatyk} leva.");
  26. }
  27. else if (Prihod < pricePresent)
  28. {
  29. double nedostig = Math.Ceiling(pricePresent - Prihod);
  30. Console.WriteLine($"She will have to borrow {nedostig} leva.");
  31. }
  32.  
  33. }
  34. }
  35. }
RAW Paste Data