Pattern star print 1

please give me the logic only how to print star in row 2 give me the logic for it

understand the pattern like
firstly you have to print numbers
and then star

in each row
you have to print n-i numbers
and then 2*i - 1 stars

Reference Code

its done thanks for the help

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.