Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Testing
- {
- class MainClass
- {
- public static void Main (string[] args)
- {
- float firstSpeed = int.Parse (Console.ReadLine ());
- float firstTime = float.Parse (Console.ReadLine ());
- float secondTime = float.Parse (Console.ReadLine ());
- float thirdTime = float.Parse (Console.ReadLine ());
- //Formating to hours
- firstTime /= 60;
- secondTime /= 60;
- thirdTime /= 60;
- float firstLine = firstSpeed * firstTime;
- double secondLine = (firstSpeed*1.10) * secondTime;
- double thirdLine = (firstSpeed * 1.10 ) * 0.95* thirdTime;
- double overallKm = firstLine + secondLine + thirdLine;
- Console.WriteLine("{0:f2}",overallKm);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment