Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _01.MovieProfit
- {
- class MovieProfit
- {
- static void Main(string[] args)
- {
- string movieName = Console.ReadLine();
- int days = int.Parse(Console.ReadLine());
- int tickets = int.Parse(Console.ReadLine());
- double ticketPrice = double.Parse(Console.ReadLine());
- int percent = int.Parse(Console.ReadLine());
- double profitForDay = tickets * ticketPrice;
- double totalProfit = profitForDay * days;
- double profitForCinema = totalProfit * (percent / 100.0);
- double studioProfit = totalProfit - profitForCinema;
- Console.WriteLine($"The profit from the movie {movieName} is {studioProfit:F2} lv.");
- }
- }
- }
Add Comment
Please, Sign In to add comment