Please guide me how to print pattern after after 4-3,2,1a nd likewise
Pattern mountain-I'm not able to print correct output
Hello @akarshiarora.17,
In the outer loop, you need a total of 3 loops.
- for increasing numbers.(j from 1 to i)
- for spaces.
- for decreasing numbers(j from i-1 to 1 for last row and from i to 1 for rest of the rows).
Also, in your code add a space after every number.
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.