Advertisement
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 _01
- {
- class Program
- {
- static void Main(string[] args)
- {
- double S = double.Parse(Console.ReadLine());
- double V= double.Parse(Console.ReadLine());
- double Y= double.Parse(Console.ReadLine());
- double vCar = V + 3.6 * Y;
- double timeTruck = S / V;
- double timeCar = S / vCar;
- Console.WriteLine("The truck arrived after {0} hours",Math.Ceiling(timeTruck));
- Console.WriteLine("The car arrived after {0} hours",Math.Ceiling(timeCar));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement