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 Demo
- {
- class Program
- {
- static void Main(string[] args)
- {
- double record = double.Parse(Console.ReadLine());
- double meters = double.Parse(Console.ReadLine());
- double timeForMeter = double.Parse(Console.ReadLine());
- double timeSlow = meters / 15;
- int slow = (int)Math.Floor(timeSlow);
- double plusTime = slow * 12.5;
- double time = plusTime + (timeForMeter * meters);
- double needed = time - record;
- if (time < record)
- {
- Console.WriteLine("Yes, he succeeded! The new world record is {0:F2} seconds.", time);
- }
- else
- {
- Console.WriteLine("No, he failed! He was {0:F2} seconds slower.", needed);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement