Adv Java
Programming
Points to keep in mind for pyramid tutorials

If variable value for e.g. 'n' is incrementing, then decrementing number can be generated by (constant – n).
for e.g.
Incrementing n Valuefor (n=1;n<=5,n++) 
Decrementing value (11n)Without another variable 
1 
10 
2 
9 
3 
8 
4 
7 
5 
6 

If variable value for e.g. 'n' is decrementing, then incrementing number can be generated by (constant – n).
for e.g.
Decrementing n Valuefor (n=5;n>=1,n) 
Incrementing value (11n)Without another variable 
5 
6 
4 
7 
3 
8 
2 
9 
1 
10 

Map Pyramid into right angle triangle into your mind.

As per the following type you can then decide, which type it should follow.