Pecatamaina

пекарнатааааа

Dec 1st, 2019
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 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.  
  7. namespace ConsoleApp1
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. double whiteBreadCnt = double.Parse(Console.ReadLine());
  14. int quantityWhiteBreadCnt = int.Parse(Console.ReadLine());
  15. int wholegrainBreadCnt = int.Parse(Console.ReadLine());
  16. int quantityBagelsCnt = int.Parse(Console.ReadLine());
  17. int quantityCroissantsCnt = int.Parse(Console.ReadLine());
  18. string emptyDay = Console.ReadLine();
  19. double pricewholegrainBread = (whiteBreadCnt * 0.20) + whiteBreadCnt;
  20. double priceQuantityBagels = Math.Abs(0.2 * pricewholegrainBread) - pricewholegrainBread;
  21. double priceQuantityCroissants = 1.50 + priceQuantityBagels;
  22.  
  23.  
  24. if (emptyDay == "yes")
  25. {
  26. int quantityMiniCakesCnt = int.Parse(Console.ReadLine());
  27. int quantityDonutsCnt = int.Parse(Console.ReadLine());
  28. double priceQuantityMiniCakes = 0.80 + quantityWhiteBreadCnt;
  29. double priceQuantityDonuts = 0.45 + priceQuantityMiniCakes;
  30.  
  31. double priceAllProducts = pricewholegrainBread + priceQuantityBagels + priceQuantityCroissants + priceQuantityMiniCakes + priceQuantityDonuts;
  32.  
  33. Console.WriteLine("Happy holidays! This will cost you {priceAllProducts:F2} lv.");
  34. }
  35.  
  36. else if (emptyDay == "no")
  37. {
  38. double priceAllProducts = pricewholegrainBread + priceQuantityBagels + priceQuantityCroissants;
  39. Console.WriteLine("The value of you order is {priceAllProducts:F2} lv.");
  40. }
  41.  
  42.  
  43.  
  44.  
  45. }
  46. }
  47. }
Add Comment
Please, Sign In to add comment