Problem 56348. Calculate the Distance to Source of Lightning
Lightning discharge heats air rapidly with lightning channels reaching temperatures of up to 50,000 degrees Fahrenheit (which is 5 times hotter than the surface of the Sun!). The rapid expansion followed by rapid contraction of the air in the lightning channel creates sound waves known as 'thunder'. Thunder can be heard for a distance of about 10 miles from the lightning strike.
Thunder, which traves about a mile in 5 seconds, has different characteristics:
- Loud boom from the main channel reaching the ground
- Sharp cracks and clicks as the channel passes near you
- Low rumbles as the channel travels farther and farther from you
The number of seconds between first seeing the flash of lightning and then hearing sound of thunder, divided by 5, is the distances to the lightning in miles: 5 seconds = 1 mile, 15 seconds = 3 miles, 0 seconds = very close.
Write a program that takes the time delay, in seconds, between the time first seeing the the flash of lightning and the time first hearing the thunder, and outputs the distance to the lightning in miles.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers88
Suggested Problems
-
Project Euler: Problem 1, Multiples of 3 and 5
3140 Solvers
-
Reverse the elements of an array
1011 Solvers
-
651 Solvers
-
460 Solvers
-
287 Solvers
More from this Author10
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!