12.15.2014

How To Make Continuous Vertical-Horizontal Number Pyramid

Q. Write a C program of Continuous Vertical Horizontal Number Pyramid design as:

 1
 6  2
10  7  3
13 11  8 4
15 14 12 9 5

Ans.

Before we starting the coding of above number pyramid design, let's focus the following source image of above pyramid:
Showing flow of data in Number Pyramid Design
Figure: Showing flow of data in Number Pyramid Design

So, In above pyramid design it is too easy to making every rows and columns. let's starting the writing source code.

/*c program for continuous vertical horizontal number pyramid*/
#include<stdio.h>
int main()
{