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