Help recursively describe the function cos(x,k) in pascal , where

 cos(x,k)=cos(cos(..cos(x)..))(k косинусов) 

    1 answer 1

     function cosk(x: Real; k: LongInt): Real; begin if k <= 0 then begin cosk := cos(x); end else cosk := cosk(x, k - 1); end; 
    • Those. cos function is used only once, and recursion is strongly concerned with decreasing k ... - alexlz