https://hack.codingblocks.com/contests/c/457/321
https://ide.codingblocks.com/s/36099
help please.
Your code gives wrong output.
It prints the required output after printing 2 lines which is not required.
This happens because you are doing \n in base case and thus it prints new line even when not required.
Try to follow some different approach. Use more variables in recursive function to keep track of the number of stars to be printed in a particular row.