Simulation of a falling ball
using namespace std; is a bad habit to get into, as it can lead to name-collisions and other issues. It's best to explicitly qualify the names we need where necessary, e.g. std::cout.

A few more line-breaks would be useful in the code. Think of code with a specific purpose as a paragraph when writing text. For example, this could be considered one &quot;paragraph&quot;, so should have an empty line after it.
 std::cout &lt;&lt; &quot;From what height do we drop the ball? (In meters): &quot;;
 double h;                                           
 std::cin &gt;&gt; h;


We have several similarly named variables h, high and hi. This makes the code harder to understand.

Variables that don't change should be marked const. (e.g. g).

Variables should generally be declared as close to the point of use as possible, set to immediately useful values, and not reused (unless they consume significant resources). For example, t, v, high and h can all be declared where they are set inside the loop.

s does not appear to be used.

We have no way to reset the static time variable in timeFallingBall(). This means we can't call fallingBall a second time, to drop another ball. We can easily just increment t in the fallingBall function instead.

while (h) translates to while (h != 0). Since h is a double with a calculated value, it's a bad idea to compare it with an exact number. We should use while (h &gt; 0.0) instead, or while (true) since we handle the exit condition inside the loop.

In C++, number literals have specific types: 0 is an int, 0.f is a float, 0.0 is a double. When comparing or assigning to variables, it's best to use the literal style of the correct variable type, rather than relying on conversions.

std::endl outputs a newline, but also flushes the output stream unnecessarily. We can output &quot;\n&quot; to get a newline without the flush.

Note that given the constant downwards acceleration, the maximum velocity is always going to be the velocity when the ball hits the ground. So we don't really need to keep track of it.

(Obviously the 1 second resolution makes the max speed output rather incorrect).



Applying the above, I'd probably go with something like:
void fallingBall()
{
    std::cout &lt;&lt; &quot;From what height do we drop the ball? (In meters): &quot;;
    double h_start;
    std::cin &gt;&gt; h_start;

    if (h_start &lt;= 0.0)
    {
        std::cout &lt;&lt; &quot;The ball is already on the ground!\n&quot;;
        return;
    }

    const double g = 9.81;

    double t = 0.0;

    while (true)
    {
        t += 1.0;

        const double h_current = h_start - 0.5 * g * t * t;
        const double v_current = g * t;

        if (h_current &lt;= 0.0)
        {
            std::cout &lt;&lt; &quot;After second &quot; &lt;&lt; t &lt;&lt; &quot;, the ball has reached the ground! Maximum speed: &quot; &lt;&lt; v_current &lt;&lt; &quot; m/s\n&quot;;
            break;
        }

        std::cout &lt;&lt; &quot;After second &quot; &lt;&lt; t &lt;&lt; &quot;, the ball is at a distance of &quot; &lt;&lt; h_current &lt;&lt; &quot; m from the ground at a speed: &quot; &lt;&lt; v_current &lt;&lt; &quot; m/s\n&quot;;
    }
}