whats wrong with my code please correct it with explanation
Pattern mountain
Hi @Ankur-Ankur-937479863269311
In the last row you have to print n only one time but your code is printing it two time. So this thing you can handle using if else. And spaces between two digits should be 2*(n-row)-1 as the you are starting the loop from 1.
Here is your corrected code in which i have commented the changes :
1 Like