A man fires a rifle in front of a cliff and hears the echo after 3 s

A man fires a rifle in front of a cliff and hears the echo after 3 s. Calculate the distance of man from the cliff, if velocity of sound in air is 340 m/s

Given, speed of sound in air, v = 340 m/s
Time taken to hear echo, t = 3 s
As we know that, distance, s = speed (v) x time (t)
= 340 x 3 = 1020 m
As in 3 s, sound has to travel twice distance between man and the cliff.
So, distance between man and cliff is =s/2 = 1020/2 = 510m