Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- static void Main(string[] args)
- {
- int initSpeed = int.Parse(Console.ReadLine());
- int firstPeriod = int.Parse(Console.ReadLine());
- int secondPeriod = int.Parse(Console.ReadLine());
- int thirdPeriod = int.Parse(Console.ReadLine());
- double initDistance = initSpeed * (firstPeriod / 60.0);
- double startSpeed = (initSpeed + initSpeed * 0.1);
- double incrDistance = startSpeed * (secondPeriod / 60.0);
- double endSpeed = startSpeed - startSpeed * 0.05;
- double decrDistance = endSpeed * (thirdPeriod / 60.0);
- Console.WriteLine((initDistance + incrDistance + decrDistance).ToString("F"));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment