Advertisement
hawzze

C#SoftUni_Благотворителнаkампания

Jun 27th, 2020
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. using System;
  2.  
  3. namespace softuni1
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int days = int.Parse(Console.ReadLine());
  10. int chefs = 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. int SumCakes = cakes * 45;
  16. double SumWaffles = waffles* 5.80;
  17. double SumPancakes = pancakes * 3.20;
  18.  
  19. double totalFor1day = (SumCakes + SumWaffles + SumPancakes) * 8;
  20. double totalCompany = totalFor1day * 20;
  21. double afterCosts = totalCompany - (double)1 / 8 * totalCompany;
  22. Console.WriteLine( $"{ afterCosts:f2}");
  23.  
  24. }
  25.  
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement