pls help me with the logic
Not able to print the second pattern
Hey @pyash
For printing this pattern mountain,
For this ques you have to run a for loop n times and in that loop you have to create 3 loops … first loop for printing increasing sequence of numbers and second loop for generating spaces and last loop for generating decreasing sequence of number… and at the end of 3 loop loop you have to add endl so that we row is generated.
For printing the second pattern, you’ve to print the numbers in reverse order for every row, and for the last row you don’t have to print n again, so you skip n and print from n-1 till 1.