Advertisement
Mitax

1. Hornet Wings

Apr 29th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _1.Hornet_Wings
  8. {
  9. class HornetWings
  10. {
  11. static void Main(string[] args)
  12. {
  13. //Distance after wingFlaps ?
  14. //For how much time ?
  15.  
  16. var wingFlaps = long.Parse(Console.ReadLine());
  17. var distanceFor1000Flaps = double.Parse(Console.ReadLine());
  18. var endurance = long.Parse(Console.ReadLine());
  19. //endurance = how many flaps before stop for a break of 5 seconds
  20. //Hornet makes 100 wing flaps per second
  21.  
  22. double distance = (wingFlaps / 1000L) * distanceFor1000Flaps;
  23.  
  24. var movingTime = wingFlaps / 100;
  25. var seconds = (wingFlaps / endurance) * 5;
  26. var finalSecondsResult = movingTime + seconds;
  27.  
  28. Console.WriteLine($"{distance:f2} m.");
  29. Console.WriteLine($"{finalSecondsResult} s.");
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement