Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _06.CharityCampaign
- {
- class Program
- {
- static void Main(string[] args)
- {
- int daysNum = int.Parse(Console.ReadLine());
- int bakers = int.Parse(Console.ReadLine());
- int cakeNum = int.Parse(Console.ReadLine());
- int wafflesNum = int.Parse(Console.ReadLine());
- int pancakesNum = int.Parse(Console.ReadLine());
- int cakesPrice = 45;
- double wafflesPrice = 5.80;
- double pancakesPrice = 3.20;
- double cakesPricePerDay = cakeNum * cakesPrice;
- double wafflesPricePerDay = wafflesNum * wafflesPrice;
- double pancakesPricePerDay = pancakesNum * pancakesPrice;
- double sumPerDay = (cakesPricePerDay + wafflesPricePerDay + pancakesPricePerDay) * bakers;
- double endSum = sumPerDay * daysNum;
- double sumAfter = endSum - (endSum/8);
- Console.WriteLine(sumAfter);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement