Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Distance
- {
- class Program
- {
- static void Main(string[] args)
- {
- var startSpeed = int.Parse(Console.ReadLine());
- var AccTime = int.Parse(Console.ReadLine());
- var DownTime = int.Parse(Console.ReadLine());
- var EndTime = int.Parse(Console.ReadLine());
- var Startlenght = (startSpeed*AccTime) ;
- var AccLenght = (startSpeed * 1.1 * DownTime) ;
- var Time = ((startSpeed*1.1*0.95)*EndTime) ;
- var total = (Startlenght + AccLenght + DownTime)/60 ;
- Console.WriteLine("{0:f2}", total);
- }
- }
- }
- /*
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Distance
- {
- class Program
- {
- static void Main(string[] args)
- {
- int speed = int.Parse(Console.ReadLine());
- var accTime = int.Parse(Console.ReadLine()) / 60.0;
- var downTime = int.Parse(Console.ReadLine()) / 60.0;
- var tmeEnd = int.Parse(Console.ReadLine()) / 60.0;
- var distance1 = (speed * accTime);
- var distance2 = (speed * 1.1 * downTime);
- var distance3 = (((speed * 1.1) * 0.95) * tmeEnd);
- double result = (distance1 + distance2 + distance3);
- Console.WriteLine("{0:f}", result);
- }
- }
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment