Ganesha pattern

mam im troubling in printing this pattern can u plz help me out how to perform necessary actions .

Try to Divide the given pattern in two parts from middle .Now do the work of these parts separately and print the required pattern accordingly.

  • Given pattern is seen as first we need to work for spaces and then for the numbers in each row.
  • Numbers are first increasing till the mid element and then decreasing till end of the row.
  • Thus, do the work of first spaces and then for numbers .
  • And then change variables accordingly for next iterations.

Always think of first row and then work for the next iteration and repeat the work total number of row times. That’s how you can solve any problem related to pattern.