Can anybody help me solve this problem??Thank You.
Write a complete C++ program which contains a recursive function to print a triangle filled with character.
Write the prototype of prtTriangle as
void prtTriangle (int n, char ch);
By calling prtTriangle(9,'@') from the main function, the output is printed as follows:
@
@@
@@@
@@@@
@@@@@
@@@@@@
@@@@@@@
@@@@@@@@
@@@@@@@@@
@@@@@@@@@@
@@@@@@@@@
@@@@@@@@
@@@@@@@
@@@@@@
@@@@@
@@@@
@@@
@@
@
Did you try to run the programs I wrote above? One program uses head recursion, the other tail
recursion. Do you not want something very similar to the combination of those programs?