Pr.Pg Next Pg

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 Value

for (n=1;n<=5,n++)

Decrementing value (11-n)

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 Value

for (n=5;n>=1,n--)

Incrementing value (11-n)

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.

  • Insert all pyramid programs here and then link it on left column too.

Pr.Pg border                                              Next Pg