Please explain the algorithm/technique to solve the problem. I am unable to build the right logic.
Thanks
Problem in writing the algorithm of "PATTERN TRIANGLE"
Hello @shrey_sharma,
- Use an outer for-loop to keep track of rows of the pattern
- Inside it, use three for loops:
2.1. First for the space
2.2. Second for the increasing sequence of each row
2.3. third for the decreasing sequence.
Try to write a code. Share your code if you face any issue.
Hope, this would help.
thanks Mr. Virender for the algorithm.
Kindly tell where to add the spaces so that my output matches the sample output
link:https://ide.codingblocks.com/s/143150
Hello @shrey_sharma,
If you would observe the output carefully,
Each element is separated by a tab.
I have modified your code:
Hope, this would help.
Give a like if you are satisfied.
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.