JSFiddle - React, Tailwind, and code Playground

HTML

<p>Test</p>
<script>
    
    Digits=38;
    r=1;
    q=16.0;
    Den=1750;
   
    CM=110*(177145.6/(404.45*Den+177145.6));
    M=q; 
    g=9.8; 
    h=11.69*.3048;
    u=Math.sqrt(2*g*h);
    N=94;
    sm=2*h/Math.sqrt(2*g*h); 
    n=1; 
    while (n<N+1) 
    {
    L=u*M/(1+M);
     u=Math.sqrt(2*g*h+L*L);
    sm=(2*h/(u+L))+sm;
    M=r*(M+1);
    n=n+1;
    }
    
    document.writeln(n);
    document.writeln("<br>total time bottom floors = "+ sm); 
    document.writeln("<br>total mass = " + M);
    document.writeln("<br>speed = " + u);
    document.writeln("<br>total time whole tower = "+ (sm+(2*h*q/(Math.sqrt(u*u+2*g*q*h)+u))));
    document.writeln("<br>Correct solid mass = " + CM);
</script>