Krasimir_Slavov

Untitled

Sep 29th, 2018
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Exer_CharityCompany
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int days = int.Parse(Console.ReadLine());
  14. int bakers = int.Parse(Console.ReadLine());
  15. int cakes = int.Parse(Console.ReadLine());
  16. int wafles = int.Parse(Console.ReadLine());
  17. int pankes = int.Parse(Console.ReadLine());
  18.  
  19. double totalcakesPrice = cakes * 45;
  20. double totalwaflesPrice = wafles * 5.80;
  21. double totalpankesPrice = pankes * 3.20;
  22.  
  23. double totalSum = (totalcakesPrice + totalwaflesPrice + totalpankesPrice) * bakers;
  24. double finalMoney = totalSum * days;
  25.  
  26. double totalMoney = finalMoney - (finalMoney / 8);
  27.  
  28. Console.WriteLine("{0:F2}", totalMoney);
  29.  
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment