Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Threading;
- class Program
- {
- static void Main()
- {
- int goalShootingTime = int.Parse(Console.ReadLine());
- int numOfShots = int.Parse(Console.ReadLine());
- int timeForOneShot = int.Parse(Console.ReadLine());
- double preparation = goalShootingTime * 0.15;
- double totalTimeForShooting = numOfShots * timeForOneShot;
- double totalTime = preparation + totalTimeForShooting;
- double difference = Math.Abs(goalShootingTime - totalTime);
- if (goalShootingTime >= totalTime)
- {
- Console.WriteLine($"You managed to finish the movie on time! You have {Math.Round(difference)} minutes left!");
- }
- else
- {
- Console.WriteLine($"Time is up! To complete the movie you need {difference} minutes.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement