Hi everyone. I'm currently learning recursion in college right now (not asking to help solve hw) and I have an assignment that I've completed. I just wanted to see if there is a more readable way to solve the problem. I'm basically struggling to trace the variables and I feel like there is a way to do the same thing with less variables. Any tips on utilizing the variables in recursion more effectively would be appreciated.
The program should take numerical input and output something like this
Input: 4
Output:
****
***
**
*
*
**
***
****
My code works but as I said, I feel it has some unnecessary parts in the math
I have no clue why I haven't thought of that... I've been trying to do it in my head. Thanks.
I'm just trying to keep it minimal mainly and reduce unnecessary code / variables. I guess I should have made the topic clearer and asked that instead.