Advertisement
Spocoman

Movie Profit

Nov 24th, 2021
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 KB | None | 0 0
  1. using System;
  2.  
  3. namespace MovieProfit
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string movie = Console.ReadLine();
  10.             int days = int.Parse(Console.ReadLine());
  11.             int ticket = int.Parse(Console.ReadLine());
  12.             double price = double.Parse(Console.ReadLine());
  13.             int percent = int.Parse(Console.ReadLine());
  14.             double sum = days * ticket * price;
  15.  
  16.             Console.WriteLine($"The profit from the movie {movie} is {sum - sum * percent / 100:F2} lv.");
  17.         }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement