Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace CharityCampaign
- {
- class Program
- {
- static void Main(string[] args)
- {
- int days = int.Parse(Console.ReadLine());
- int confectioners = int.Parse(Console.ReadLine());
- int cackes = int.Parse(Console.ReadLine());
- int wafers = int.Parse(Console.ReadLine());
- int pancakes = int.Parse(Console.ReadLine());
- int caceOnePrice = 45;
- double waferOnePrice = 5.80;
- double pancakesOnePrice = 3.20;
- double cackesTotalPrice = cackes * caceOnePrice;
- double wafersTotalPrice = wafers * waferOnePrice;
- double pancakesTotalPrice = pancakes * pancakesOnePrice;
- double priceOneDay = cackesTotalPrice + wafersTotalPrice + pancakesTotalPrice * confectioners;
- double priceHoleCompany = priceOneDay * 20;
- double priceAfterCosts = priceHoleCompany - 1/8;
- Console.WriteLine ($"{priceAfterCosts:F2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement