Advertisement
poli_rk

Untitled

Sep 22nd, 2020
347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. using System;
  2.  
  3. namespace CharityCampaign
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int days = int.Parse(Console.ReadLine());
  10. int bakersCount = int.Parse(Console.ReadLine());
  11. int cakes = int.Parse(Console.ReadLine());
  12. int waffles = int.Parse(Console.ReadLine());
  13. int pancakes = int.Parse(Console.ReadLine());
  14.  
  15. double cakesPerDay = cakes * 45;
  16. double wafflesPerDay = waffles * 5.80;
  17. double pancakesPerDay = pancakes * 3.20;
  18. double sumPerDay = (cakesPerDay + wafflesPerDay + pancakesPerDay) * bakersCount;
  19. double totalSumOfCampaign = sumPerDay * days;
  20. double result = totalSumOfCampaign - (totalSumOfCampaign * 1 / 8);
  21.  
  22. Console.WriteLine(result);
  23. }
  24. }
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement