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 LabExercises
- {
- class Program
- {
- static void Main(string[] args)
- {
- int sectorsNumber = int.Parse(Console.ReadLine());
- int capacity = int.Parse(Console.ReadLine());
- double ticketPrice = double.Parse(Console.ReadLine());
- double oneSectorIncome = (capacity * ticketPrice) / sectorsNumber;
- double totalIncome = oneSectorIncome * sectorsNumber;
- double charity = (totalIncome - (oneSectorIncome * 0.75)) / 8;
- Console.WriteLine("Total income - {0:F2} BGN", totalIncome);
- Console.WriteLine("Money for charity - {0:F2} BGN", charity);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement