Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace StadiomIncome
- {
- class Program
- {
- static void Main(string[] args)
- {
- double numberOfSectors = double.Parse(Console.ReadLine());
- double capacityOfTheStadium = double.Parse(Console.ReadLine());
- double priceOfTheTicket = double.Parse(Console.ReadLine());
- double profit = 0;
- double charity = 0;
- double profitBysectors = (capacityOfTheStadium * priceOfTheTicket) / numberOfSectors;
- profit = capacityOfTheStadium * priceOfTheTicket;
- charity = 0.125 * (profit - (0.75 * profitBysectors));
- Console.WriteLine($"Total income - {(capacityOfTheStadium * priceOfTheTicket):f2} BGN");
- Console.WriteLine($"Money for charity - {charity:F2} BGN");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement