Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _01.StadiumIncome
- {
- class Program
- {
- static void Main(string[] args)
- {
- int sectorNum = int.Parse(Console.ReadLine());
- int stadiumCapacity = int.Parse(Console.ReadLine());
- double ticketPrice = double.Parse(Console.ReadLine());
- double totalIncome = 0.0;
- double charity = 0.0;
- double sectorIncome = 0.0;
- totalIncome = stadiumCapacity * ticketPrice;
- sectorIncome = totalIncome / sectorNum;
- charity = (totalIncome - (0.75 * sectorIncome)) / 8.0;
- Console.WriteLine($"Total income - {totalIncome:F2} BGN");
- Console.WriteLine($"Money for charity - {charity:F2} BGN");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement