2.17.2015

How to make continuous number pyramid with Zero

Q. Write a C program to make a continuous number pyramid with adding digit "Zero" as:

  1
  02
  003
  0004
  00005
  000006
  0000007
  00000008
  000000009

Ans.

/*c program for making a continuous number pyramid*/
#include<stdio.h>
int main()
{
 int r,c;

2.01.2015

How To Design Taj Mahal Shape Pyramid

Q. Write a C program to print the following Taj Mahal Shape pyramid as:

*
***
*****
*******
**
****
******
*******
******
****
**
*******
*****
***
*

Ans.

/*c program for Taj Mahal shape pyramid*/
#include<stdio.h>
int main()
{