8.08.2015

Character Triangle Shape C Program

Q. How to design a character triangle shape C program as:

 ABCDE
 ABCD
 ABC
 AB
 A

Ans.

/*Character Triangle Shape C Program*/
#include<stdio.h>
int main()
{

4.18.2015

Print Rectangle Pattern Program In C

Q. Print the rectangle pattern program in C as following design:

  1111111
  1222221
  1233321
  1234321
  1233321
  1222221
  1111111

Ans.

  1111111
  1222221
  1233321
  1234321
  1233321
  1222221
  1111111

Tips/Tricks:  Each color group represent a loop in rectangle pattern program as the below                              source code written.

/* source code for print the rectangle pattern program*/

#include<stdio.h>
int main()
{

3.05.2015

Floyd Algorithm Character Pattern In C

Q. WAP (Write A Program) to making the floyd algorithm character pattern in C as:

  A
  BC
  DEF
  GHIJ
  KLMNO

Ans.

/*c program for floyd algorithm character pattern*/
#include<stdio.h>
int main()
{

3.03.2015

How To Make Half Rhombus Shape Number Triangle

Q. How to make half rhombus number triangle as:

  5
  456
  34567
  2345678
  123456789
  2345678
  34567
  456
  5

Ans.

/*c program for half rhombus number triangle*/
#include<stdio.h>
int main()
{
 int r,c,j,num,n;
 printf("Enter Any Number : ");
 scanf("%d", &num);

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()
{

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()
{