Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace MovieStars
- {
- class Program
- {
- static void Main(string[] args)
- {
- double budget = double.Parse(Console.ReadLine());
- while (true)
- {
- string actor = Console.ReadLine();
- if (actor == "ACTION")
- {
- break;
- }
- if (actor.Length <= 15)
- {
- double salary = double.Parse(Console.ReadLine());
- budget -= salary;
- }
- else
- {
- budget *= 0.8;
- }
- if (budget < 0)
- {
- break;
- }
- }
- if (budget < 0)
- {
- Console.WriteLine($"We need {Math.Abs(budget):F2} leva for our actors.");
- }
- else
- {
- Console.WriteLine($"We are left with {budget:F2} leva.");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment