Found at last in c++


that why i was getting the errors ?
i had given the correct function name and arguments know

Hello @Chandra123,

  1. The return type of your function is void.
    So, how can you print?

  2. How can you return from the function with return type void?

  3. Pass n instead of n-1 in the function.

I have corrected your code:

Hope, this would help.
Give a like if you are satisfied.