Calculation of unsteady two-dimensional laminar and turbulent boundary layers with fluctuations in external velocity