Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace MovieDay
- {
- class Program
- {
- static void Main(string[] args)
- {
- int movieTime = int.Parse(Console.ReadLine());
- int scene = int.Parse(Console.ReadLine());
- int sceneTime = int.Parse(Console.ReadLine());
- double total = 0.15 * movieTime + scene * sceneTime;
- if (total >= movieTime)
- {
- Console.WriteLine($"Time is up! To complete the movie you need {Math.Round(total - movieTime)} minutes.");
- }
- else
- {
- Console.WriteLine($"You managed to finish the movie on time! You have {Math.Round(movieTime - total)} minutes left!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement