Advertisement
aneliabogeva

Untitled

Mar 15th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 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 StadiomIncome
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. double numberOfSectors = double.Parse(Console.ReadLine());
  14. double capacityOfTheStadium = double.Parse(Console.ReadLine());
  15. double priceOfTheTicket = double.Parse(Console.ReadLine());
  16.  
  17. double profit = 0;
  18. double charity = 0;
  19.  
  20. double profitBysectors = (capacityOfTheStadium * priceOfTheTicket) / numberOfSectors;
  21.  
  22. profit = capacityOfTheStadium * priceOfTheTicket;
  23.  
  24. charity = 0.125 * (profit - (0.75 * profitBysectors));
  25.  
  26. Console.WriteLine($"Total income - {(capacityOfTheStadium * priceOfTheTicket):f2} BGN");
  27. Console.WriteLine($"Money for charity - {charity:F2} BGN");
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement