Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- double whiteBreadCnt = double.Parse(Console.ReadLine());
- int quantityWhiteBreadCnt = int.Parse(Console.ReadLine());
- int wholegrainBreadCnt = int.Parse(Console.ReadLine());
- int quantityBagelsCnt = int.Parse(Console.ReadLine());
- int quantityCroissantsCnt = int.Parse(Console.ReadLine());
- string emptyDay = Console.ReadLine();
- double pricewholegrainBread = (whiteBreadCnt * 0.20) + whiteBreadCnt;
- double priceQuantityBagels = Math.Abs(0.2 * pricewholegrainBread) - pricewholegrainBread;
- double priceQuantityCroissants = 1.50 + priceQuantityBagels;
- if (emptyDay == "yes")
- {
- int quantityMiniCakesCnt = int.Parse(Console.ReadLine());
- int quantityDonutsCnt = int.Parse(Console.ReadLine());
- double priceQuantityMiniCakes = 0.80 + quantityWhiteBreadCnt;
- double priceQuantityDonuts = 0.45 + priceQuantityMiniCakes;
- double priceAllProducts = pricewholegrainBread + priceQuantityBagels + priceQuantityCroissants + priceQuantityMiniCakes + priceQuantityDonuts;
- Console.WriteLine("Happy holidays! This will cost you {priceAllProducts:F2} lv.");
- }
- else if (emptyDay == "no")
- {
- double priceAllProducts = pricewholegrainBread + priceQuantityBagels + priceQuantityCroissants;
- Console.WriteLine("The value of you order is {priceAllProducts:F2} lv.");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment