Advertisement
Guest User

Untitled

a guest
Feb 14th, 2020
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 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 confectioners = int.Parse(Console.ReadLine());
  11. int cackes = int.Parse(Console.ReadLine());
  12. int wafers = int.Parse(Console.ReadLine());
  13. int pancakes = int.Parse(Console.ReadLine());
  14. int caceOnePrice = 45;
  15. double waferOnePrice = 5.80;
  16. double pancakesOnePrice = 3.20;
  17. double cackesTotalPrice = cackes * caceOnePrice;
  18. double wafersTotalPrice = wafers * waferOnePrice;
  19. double pancakesTotalPrice = pancakes * pancakesOnePrice;
  20. double priceOneDay = cackesTotalPrice + wafersTotalPrice + pancakesTotalPrice * confectioners;
  21. double priceHoleCompany = priceOneDay * 20;
  22. double priceAfterCosts = priceHoleCompany - 1/8;
  23. Console.WriteLine ($"{priceAfterCosts:F2}");
  24.  
  25.  
  26.  
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement