Pyramid

Loading...

Note: 

The comment session of this page not working due to technically problem, so Kindly write your question/comment at any related pyramid program.

          @@@@@
          @@@@@
          @@@@@
          @@@@@
          @@@@@

# # # # #

# # # #


# # #



# #




#

          @ @ @ @ @
          @ @ @ @
          @ @ @
          @ @
          @

#



# #


# # #

# # # #
# # # # #


Q.5  Write a program to generate a following @'s triangle:                                




@



@ @


@ @ @

@ @ @ @
@ @ @ @ @

          12345
          12345
          12345
          12345
          12345

          54321
          54321
          54321
          54321
          54321

          55555
          44444
          33333
          22222
          11111

          11111
          22222
          33333
          44444
          55555

          1
          12
          123
          1234
          12345

          12345
          1234
          123
          12
          1

1



1 2


1 2 3

1 2 3 4
1 2 3 4 5

          54321
          4321
          321
          21
          1

          1
          21
          321
          4321
          54321

          12345
          1234
          123
          12
          1

1 2 3 4 5

1 2 3 4


1 2 3



1 2




1





1






1 2 1




1 2 3 2 1


1 2 3 4 3 2 1
1 2 3 4 5 4 3 2 1

1 2 3 4 5 4 3 2 1

1 2 3 4 3 2 1


1 2 3 2 1




1 2 1






1









*








* * *






* * * * *




* * * * * * *


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

          1
          2 3
          4 5 6
          7 8 9 10

          1
         1 1
        1 2 1
       1 3 3 1

          A
          B B
          C C C
          D D D D

           A
         A B A
       A B C B A
     A B C D C B A
   A B C D E D C B A

          A B C D E D C B A
            B C D E D C B
              C D E D C
                D E D
                  E


1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
4 4 4 4
3 3 3
2 2
1


I
IN
IND
INDI
INDIA
INDIA
INDI
IND
IN
I


A
BB
CCC
DDDD
CCC
BB
A


1
2 2
3 3 3
4 4 4 4
5 5 5 5 5


123454321
 2345432
  34543
   454
    5


Q.30.  Write a C program to display the following number triangle structure:-

     1
    21
   321
  4321
 54321

Q.31.  Write a C program to display the following number triangle structure:

 54321
  4321
   321
    21
     1

Q.32  Write a C program to print the following number pyramid:


          1
         2 2
        3 3 3
       4 4 4 4
      5 5 5 5 5
     6 6 6 6 6 6



Q.33  Write a C program to print the following number structure:


          1
         1 2
        1 2 3
       1 2 3 4
      1 2 3 4 5 
     1 2 3 4 5 6




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


     1
    212
   32123
  4321234
   32123
    212
     1


     1
    121
   12321
  1234321
   12321
    121
     1


     A
    ABA
   ABCBA
  ABCDCBA
   ABCBA
    ABA
     A


      A
     ABA
    ABCBA
   ABCDCBA


  ABCDCBA
   ABCBA
    ABA
     A



     A
    AB
   ABC
  ABCD
 ABCDE
  ABCD
   ABC
    AB 
     A

Q.41  Write a C program to display the following square character triangle:


A
BA
CBA
DCBA
EDCBA
DCBA
CBA
BA
A

Q.42  Write a C program to print the following character triangle:


EDCBA
DCBA
CBA
BA
A

Q.43  Write a C program to print the following number design/triangle:

9
0 1
2 3 4
5 6 7 8
9 0 1 2 3

Q. 44  Write a C program to print the following number rectangle:

12344321
123__321
12____21
1______1

Q. 45  Write a C program to print the following number pyramid or number structure:

            1
          1 2 3
        1 2 3 4 5
      1 2 3 4 5 6 7
    1 2 3 4 5 6 7 8 9

Q. 46 Write a C program for print the following number pyramid:

123456654321
1234554321
12344321
123321
1221
11

Q. 47 Write a C program for print the following character pyramid:

ABCDEFFEDCBA
ABCDEEDCBA
ABCDDCBA
ABCCBA
ABBA
AA

Q. 48  Write a C program to print the following number pyramid:

       1
      222
     33333
    4444444
   555555555

Q. 49 Write a C program to print the following number triangle:

 9
 898
 78987
 6789876


Q. 50 Write a C program to print the following number triangle:

 5
 45
 345
 2345
 12345



Q. 51 Write a C program to print the following number triangle:


 5
 454
 34543
 2345432
 123454321

Q. 52 Write a C program to print the following star structure/fashion:

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

Q. 53  Write a C program to print the following rectangle number pyramid:

33333
32223
32123
32223
33333

Q. 54 Write a C program to print the star triangle frame pyramid like as:

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

Q. 55  Write a C program to print the following star pattern pyramid:

*
***
******

Q. 56 Write a C program to display the reverse star pyramid as:

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

Q. 57  Write a C program to display odd number series pyramid as:

1
3  5  7
9 11 13 15 17 19

Q.58 Write a C program to print the following number pyramid/triangle:

54321
5432
543
54
5

Q.59 Write a C program to print the number character pyramid as:

1
AB
123
ABCD
12345

Q. 60 Write a C program to print the following Floyd triangle as:

       1
      2 3
     4 5 6
    7 8 9 10

Q.61 Write a C program to print the following number pyramid:

1 2 3 4 5
 2 3 4 5
  3 4 5
   4 5
    5

Q.62 Write a C program to print the following character pyramid:

A
BA
ABA
BABA
ABABA

Q.63 Write a C program to accept the number of rows of pyramid and print the star pyramid as:if entered number by user is 7 then output would be:

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

Q.64 Write a C program to print the following number pyramid:

1
232
34543
4567654

Q.65 Write a C program to print the following number rectangle structure:

12321
12 21
1   1
12 21
12321

Q.66 Write a C program to print the following character rectangle design:

ABCBA
AB BA
A   A
AB BA
ABCBA

Q.67 Write a C program to print the following star triangle structure:

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

Q.68 Write a C program to print the following number rectangle program:

1234
2341
3412
4123

Q.69 Write a C program to print the following character rectangle program:

ABCD
BCDA
CDAB
DABC

Q.70 Write a C program to print the following number pyramid program:

1234
341
12
3

Q.71 Write a C program to print the following character pyramid program:

ABCD
CDA
AB
C

Q.72 Write a C program to print the following number pyramid using function:

 1
 2 3
 4 5 6
 7 8 9 1
 2 3 4 5 6

Q.73 Write a C program to print the following number pyramid:

1
123
12345
1234567

Q.74 Write a C program to print the following number pyramid:

1333
2222
3331

Q.75 Write a C program to print number character pyramid as:

1      a
21     ba
321    cba
4321   dcba
54321  edcba

Q.76 Write a C program to print 0 and 1 number triangle as:

1
01
010
1010
10101

Q.77 Write the 1 and 0 number pyramid program as:

1
01
101
0101
10101

Q.78 Print Square star pyramid as:

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

Q.79 Print Rectangle star pyramid as:

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

Q.80 Even-odd number star pyramid as:

1
*2
1*3
*2*4
1*3*5

Q.81 Print continue character number pyramid as:

1
A B
2 3 4
C D E F
5 6 7 8 9

Q.82 Print below nested star pyramid as:

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

Q.83  Print any random number pyramid as:

4572
572
72
2

Q.84 Print the following number design:

 1
 23
 4
 56
 7
 89
 10

Q.85 Design the following number pyramid:

1
121
1231
12341
123451

Q.86 Design the following continues number pyramid:

1
121
12321
1234321
123454321

Q.87 Print following alternative number-star pyramid as:

1
2*2
3*3*3
4*4*4*4
4*4*4*4
3*3*3
2*2
1

Q.88 print diagonal star-zero pyramid as:

*000000
0*00000
00*0000
000*000
0000*00
00000*0
000000*

Q.89 Any number geometric sequence number pyramid as:

 7
 14 15
 28 29 30 31
 56 57 58 59 60 61 62 63

Q.90 Print the nested hash-star pyramid as:

#####*#####
####*#*####
###*###*###
##*#####*##
#*#######*#
*#########*


Q.91 Print half-square number triangle as:

543212345
 4321234
  32123
   212
    1

Q.92 Print equilateral triangle number as:

     5
    454
   34543
  2345432
 123454321

Q.93 Print positive-negative number triangle as:


8  6
7  5  3
4  2  0 -2
1 -1 -3 -5 -7

Q.94 print Star-Zero nested pattern as:

*000*000*
0*00*00*0
00*0*0*00
000***000

Q.95 Print the continuous vertical number pyramid as:

1
2  7
3  8 13
4  9 14 19 
5 10 15 20 25

Q.96 Nested number character pyramid C program:

A
1
BB
22
CCC
333

Q.97 Nested two types symbol pyramid c program:

@
#
@@
##
@@@
###

Q.98 Square number pyramid C program:

1
1 4 9
1 4 9 16 25
1 4 9 16 25 36 49
1 4 9 16 25 36 49 64 81


Not found your required pyramid pattern!!
Check out our another

Big List of 100+ C Pyramid Programs.

280 comments:

  1. Hello sir, can u give me source code of the following program(i tried to write it,bt can't do completed,,some error comming:

    ----1
    ---212
    --32123
    ---212
    ----1

    (single space=-)
    write answer as soon as possible,,Thanks.

    ReplyDelete
  2. @vk,I write your problem solution below, find out your error and enjoy programming with C.

    #include"stdio.h"
    #include"conio.h"
    void main()
    {
    int num=3,r=1,c,z,sp;
    clrscr();
    while(num>=r)
    {
    sp=num-r;
    while(sp>=1)
    {
    printf(" ");
    sp--;
    }
    c=r;
    while(c>=1)
    {
    printf("%d",c);
    c--;
    }
    z=2;
    while(z<=r)
    {
    printf("%d",z);
    z++;
    }
    printf("\n");
    r++;
    }
    r=1;
    while(num>=r)
    {
    sp=r;
    while(sp>=1)
    {
    printf(" ");
    sp--;
    }
    c=num-r;
    while(c>=1)
    {
    printf("%d",c);
    c--;
    }
    z=2;
    while(z<=num-r)
    {
    printf("%d",z);
    z++;
    }
    printf("\n");
    r++;
    }
    getch();
    }

    Output:-
    _ _ _ 1
    _ _ 2 1 2
    _ 3 2 1 2 3
    _ _ 2 1 2
    _ _ _ 1

    ReplyDelete
    Replies
    1. sir sorry for the interruption, but i need some clearing.. errors are making me frustrated. what code could be possible in this output:
      example: if seed=3; size=4
      3456
      789
      01
      2
      this is a right aline 6,9,1,2 is perfectly straight aline downwards
      write answer as soon as possible, thank you :)

      Delete
    2. another question sir,
      example: if n=5 and the five numbers entered are 4,14,5,6,1
      then compute for 4+14-5+6-1=18
      need a quick answer, thank you :)

      Delete
    3. @Richard,

      Your required below program source code.

      Delete
  3. Hello sir, can u give me source code of the following program
    1
    2 2
    3 3 3
    2 2
    1
    write answer as soon as possible.
    Thanks.

    ReplyDelete
    Replies
    1. @Gautam, source code for your problem below. I also write it in above page for easily readable.

      /*c program for above triangle structure*/
      #include
      #include
      int main()
      {
      int num=3,n,r=1,c;
      while(num >= r)
      {
      c=1;
      while(c <= r)
      {
      printf("%d",r);
      c++;
      }
      printf("\n");
      r++;
      }
      n=num-1;
      while(n >= 1)
      {
      c=1;
      while(c <= n)
      {
      printf("%d",n);
      c++;
      }
      printf("\n");
      n--;
      }
      return 0;
      }

      Delete
    2. #include
      void main()
      {
      int r,c;

      for(r=1; r<=3; r++)
      {
      for(c=1; c<=r; c++)
      printf("%d",r);
      printf("\n");
      }
      for(r=2; r>=1; r--)
      {
      for(c=r; c>=1; c--)
      printf("%d",r);
      printf("\n");
      }
      }

      Delete
    3. what code could be possible in this output:
      example: if seed=3; size=4
      3456
      789
      01
      2
      this is a right aline 6,9,1,2 is perfectly straight aline downwards
      write answer as soon as possible, thank you :)

      Delete
  4. Code needed for useing modulus
    9
    0 1
    2 3 4
    5 6 7 8
    9 0 1 2 3

    ReplyDelete
    Replies
    1. @Moniruzzaman titu, Your required source code:

      http://cprogrammingcodes.blogspot.in/2012/06/pyramid-triangle.html

      (I also mention this program to above pyramid page at Q.43)

      Delete
  5. how to print
    1234321
    123_321
    12___21
    1_____1

    ReplyDelete
    Replies
    1. @vedanush Dash, C source code for your number program at:

      http://cprogrammingcodes.blogspot.in/2012/07/number-rectangle-structure.html

      Delete
  6. Hello sir, can u give me source code of the following program


    To accept a string and display its only string stored in even position characters in c language.

    regards,
    rajeev
    mail.rajeev4u@gmail.com

    ReplyDelete
    Replies
    1. @Rajeev(java4U), your required source code of above program at:

      http://cprogrammingcodes.blogspot.in/2012/07/print-even-position-character.html

      Delete
  7. plz give progam of
    A
    BA
    ABA
    BABA
    ABABA

    ReplyDelete
    Replies
    1. @py4408,
      Your required source code at:
      (I also add this program Q.62 )

      http://www.cprogrammingcodes.blogspot.in/2012/11/character-pyramid_18.html

      Delete
  8. plz give me c++ program for this-

    A
    a a
    B B B
    b b b b
    C C C C C
    c c c c
    D D D
    d d
    E

    ReplyDelete
  9. pls give me source for this :

    9
    898
    78987
    6789876

    ReplyDelete
    Replies
    1. Your required source code for above program at:

      http://www.cprogrammingcodes.blogspot.in/2012/09/number-triangle.html

      (I also mention this program to above pyramid page at Q.49)

      Delete
  10. plz give me c program
    ___*___
    __*_*__
    ___*___
    __*_*__
    _*_*_*_
    ___*___
    __*_*__
    _*_*_*_
    *_*_*_*
    ___|___
    ___|___
    _-----_

    ReplyDelete
    Replies
    1. @Gurpreet Singh,

      Source code for your above program at:

      http://www.cprogrammingcodes.blogspot.in/2012/09/star-triple-pyramid.html

      Delete
  11. how to make this, thank you before

    3 3 3 3 3
    3 2 2 2 3
    3 2 1 2 3
    3 2 2 2 3
    3 3 3 3 3

    ReplyDelete
    Replies
    1. Your required program source code at:
      (I also add this program at Q.53)

      http://www.cprogrammingcodes.blogspot.in/2012/10/rectangle-number-pyramid.html

      Delete
  12. how to create C PROGRAM. Please Help
    1
    3 5 7
    9 11 13 15 17

    i.e. ODD SERIES in pyramid form.

    ReplyDelete
    Replies
    1. Your required odd number series pyramid source code at:
      (I also add this program at Q.57)

      http://www.cprogrammingcodes.blogspot.in/2012/10/odd-number-series-pyramid.html

      Delete
  13. how to create please tell me ..

    5 4 3 2 1
    5 4 3 2
    5 4 3
    5 4
    5

    ReplyDelete
    Replies
    1. @Ritesh Roy,
      Your required above number pyramid program source code at:
      (I also add this program at Q.58)

      http://cprogrammingcodes.blogspot.in/2012/10/number-pyramid.html

      Delete
    2. main()
      {
      int n,i,j,c=1;
      clrscr();
      printf("Enter the number of rows u want\n");
      scanf("%d",n);
      for(i=n;i>=1;i--)
      {
      for(j=n; j>=c;j--)
      {
      printf("%d",j);
      printf(" ");
      }
      c=c+1;
      }
      return 0;
      getch();
      }
      please try this code i think it is work is there any problem
      please reply me to this mail

      Delete
  14. Sir,
    Can you tell me how to create ?
    1
    A B
    1 2 3
    A B C D
    1 2 3 4 5

    ReplyDelete
    Replies
    1. @Smeet Maniar,
      Your required character-number pyramid source code at:
      (I also add this program Q.59)

      http://cprogrammingcodes.blogspot.in/2012/11/number-character-pyramid.html

      Delete
  15. Sir i need a source code for this ..

    1-2-3
    -2-3
    --3

    here - accounts for a space .. pl help!

    ReplyDelete
    Replies
    1. @Mohitthefuturemessi,

      Your required pyramid code source code at:
      (i add this program Q.61)

      http://www.cprogrammingcodes.blogspot.in/2012/11/number-pyramid.html

      Delete
  16. please give me the source code of ....

    1--2--3
    -1---2
    ---1

    ReplyDelete
    Replies
    1. @Mohitthefuturemessi,

      Your required number pyramid source code at:

      http://cprogrammingcodes.blogspot.in/2012/11/number-pyramid_4.html

      Delete
  17. how to make program if the user enter the number 3 print the form
    *
    * *
    *
    and if the user enter the number 5 print the form
    *
    * *
    * * *
    * *
    *
    and if the user enter the number 7 print the form
    *
    * *
    * * *
    * * * *
    * * *
    * *
    *

    ReplyDelete
    Replies
    1. @semere mehari,
      Your required program source code at:
      (I also add this program Q.63 )

      http://cprogrammingcodes.blogspot.in/2012/11/star-pyramid.html

      Delete
  18. please give me the source code of ....

    ABCBA
    AB BA
    A A
    AB BA
    ABCBA

    ReplyDelete
    Replies
    1. @Simarpreet Singh,
      Your required program source code at:
      (I also add this at Q.66)

      http://cprogrammingcodes.blogspot.in/2012/12/character-rectangle-design.html

      Delete
  19. This comment has been removed by the author.

    ReplyDelete
  20. i need this output..
    1
    232
    34543
    4567654

    ReplyDelete
    Replies
    1. @karthi keyan,
      Your required program source code at:
      (I also add this at Q.64)

      http://www.cprogrammingcodes.blogspot.in/2012/12/number-triangle-program.html

      Delete
  21. *********
    *******
    *****
    ***
    *
    plz give me coding for this digram

    ReplyDelete
    Replies
    1. @Lochan sao,
      Your required source code at:
      (I also add this program at Q.67)

      http://www.cprogrammingcodes.blogspot.in/2012/12/star-triangle-pyramid.html

      Delete
  22. Replies
    1. @Dashami Umesh,
      Your required source code at:
      (I also add this program at Q.71)

      http://www.cprogrammingcodes.blogspot.in/2012/12/character-pyramid-program.html

      Delete
  23. This comment has been removed by the author.

    ReplyDelete
  24. using function

    1
    2 3
    4 5 6
    7 8 9 1
    2 3 4 5 6

    if there were five rows...

    ReplyDelete
    Replies
    1. @Alj,
      Your required source code of pyramid using function at:
      (I also add this program at Q.72)

      http://cprogrammingcodes.blogspot.in/2012/12/number-pryamid-by-function.html

      Delete
  25. i want this c code
    1
    123
    12345
    1234567

    ReplyDelete
    Replies
    1. @mani gandan,
      Your required source code of number pyramid at:
      (I also add this program at Q.73)

      http://cprogrammingcodes.blogspot.in/2012/12/number-pyramid_17.html

      Delete
  26. program to dsplay the following pattern
    1 3 3 3
    2 2 2 2
    3 3 3 1

    ReplyDelete
    Replies
    1. @Sree Hari,
      Your required source code of number pyramid at:
      (I also add this program at Q.74)

      http://cprogrammingcodes.blogspot.in/2012/12/number-rectangle.html

      Delete
  27. This comment has been removed by the author.

    ReplyDelete
  28. can u give me the code for following pattern

    1______a
    21_____ba
    321____cba
    4321___dcba
    54321__edcba

    ReplyDelete
    Replies
    1. @Kate,
      Your required source code of number-character pyramid at:
      (I also add this program at Q.75)

      http://cprogrammingcodes.blogspot.in/2013/01/number-character-triangle.html

      Delete
  29. can u give me code for printing anybody's name in stars??
    ex: siva
    ****** * * * ***
    * * * * *
    ****** * * * * *
    * * * * * *
    ****** * ** ** *

    ReplyDelete
    Replies
    1. sivaji,
      I little bit confuse,
      How much stars you want to print? is number_of_stars is equal to number_of_charater_in_name?
      Explained your question.

      Delete
  30. I want the input for this output:
    1
    01
    101
    0101
    10101

    ReplyDelete
    Replies
    1. @madhura naik,
      Your required source code of number-character pyramid at:
      (I also add this program at Q.77)

      http://www.cprogrammingcodes.blogspot.in/2013/01/1-and-0-pyramid.html

      Delete
  31. I want the input for this output
    1
    13
    135
    1357

    ReplyDelete
    Replies
    1. void main(){
      int i,j,n;
      clrscr();
      printf("enter the row size:");
      scanf("%d",&n);
      for(i=1;i<=n;i++)
      {
      for(j=1;j<=i;j++)

      printf("%3d",j+j-1);

      printf("\n");
      }
      getch();
      }

      Delete
    2. How do i print this in a pyramid?
      like:
      1
      1 3 5
      1 3 5 7
      ......(when we input no. of lines)

      Delete
  32. Replies
    1. @PATIL VAMSI KRISHNA REDDY,

      Your required program source code at:

      http://cprogrammingcodes.blogspot.in/2013/04/odd-number-triangle_21.html

      Delete
  33. program for
    1
    21A
    321AB
    4321ABC
    54321ABCD

    ReplyDelete
    Replies
    1. @Jash Kothari,

      Your required program source code at:

      http://cprogrammingcodes.blogspot.in/2013/04/number-character-triangle.html

      Delete
  34. Program for Q.19, the star/asterisk triangle using FUNCTION. Thanks. :)

    ReplyDelete
  35. Replies
    1. void main(){
      int i,j,p;
      clrscr();
      for(i=1;i<=4;i++)
      {
      p=68;
      for(j=4;j>=i;j--)
      {
      printf("%2c",p);
      p--;
      }
      printf("\n");
      }
      getch();
      }

      Delete
  36. cout<<"\n I WANT YOUR HELP TO FIND THE THE PYRAMID OF";
    cin>> A
    A B
    A B C

    ReplyDelete
    Replies
    1. void main(){
      int i,j,p;
      clrscr();
      for(i=1;i<=3;i++)
      { p=65;
      for(j=1;j<=i;j++)
      {
      printf("%2c",p);
      p++;
      }
      printf("\n");
      }
      getch();
      }

      Delete
  37. 1
    121 1 121
    12321 121 1 121 12321

    program to make this pyramid

    ReplyDelete
  38. Pls Help

    1
    11
    2222
    333333
    44444444
    5555555555

    Thnx in advance

    ReplyDelete
    Replies
    1. @Shivinder Chandok,

      Your required program source code at:

      http://cprogrammingcodes.blogspot.in/2013/03/double-number-triangle.html

      Delete
    2. void main()
      {
      int i,j,n;
      clrscr();
      printf("enter row size:");
      scanf("%d",&n);
      for(i=1;i<=n;i++)
      {


      for(j=1;j<=i;j++)
      { if(i<3)
      printf("%3d",1);
      else
      for(j=1;j<i;j++)
      printf("%3d%3d",i-1,i-1);
      }

      printf("\n");
      }
      getch();
      }

      Delete
  39. sir can u pls giv d code for...
    8 8 8 8 8 8 8 8
    8 7 7 7 7 7 7 7
    8 7 6 6 6 6 6 6
    8 7 6 5 5 5 5 5
    8 7 6 5 4 4 4 4
    8 7 6 5 4 3 3 3
    8 7 6 5 4 3 2 2
    8 7 6 5 4 3 2 1

    ReplyDelete
    Replies
    1. void main(){
      int i,j,n;
      clrscr();
      printf("enter the row size:");
      scanf("%d",&n);
      for(i=1;i<=n;i++)
      {
      for(j=1;j<=n;j++)
      { //if(j==5)
      //printf(" ");

      if(j<=i)
      printf("%2d",9-j);
      else
      printf("%2d",8-(i-1));
      }
      printf("\n");
      }
      getch();
      }

      Delete
  40. Sir,I Want the Output of this

    - -1
    -2 3 2
    3 4 5 4 3
    Thanx in Adance

    ReplyDelete
    Replies
    1. @Ujaan Nandy,

      Your required program source code at:

      http://cprogrammingcodes.blogspot.in/2013/03/static-number-pyramid.html

      Delete
  41. source code in c send
    ABCDEFGFEDCBA
    ABCDEF FEDCBA
    ABCDE EDCBA
    ABCD DCBA
    ABC CBA
    AB BA
    A A
    AB BA
    ABC CBA
    ABCD DCBA
    ABCDE EDCBA
    ABCDEF FEDCBA
    ABCDEFGFEDCBA

    ReplyDelete
  42. How can we make a square of stars in c?

    ReplyDelete
    Replies
    1. @Anshul Chugh,

      Your required source code of number-character pyramid at:
      (I also add this program at Q.78)

      http://cprogrammingcodes.blogspot.in/2013/04/square-star-pyramid.html

      Delete
  43. Can you please write this program?

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

    ReplyDelete
    Replies
    1. @Jimish Shah,

      Your required program source code at:

      http://cprogrammingcodes.blogspot.in/2013/04/simple-star-pyramid.html

      Delete
  44. 1
    **
    123
    ***
    12345
    *****
    can u give me the code for following pattern in c lanuage

    ReplyDelete
    Replies
    1. @Ateet Mishra,

      Your required program source code at:

      http://cprogrammingcodes.blogspot.in/2013/04/number-star-pyramid.html

      Delete
  45. 1
    *2
    1*3
    *2*4
    1*3*5
    *2*4*6
    can u give me the code for following pattern in c language only

    ReplyDelete
    Replies
    1. @Ateet Mishra,

      Your required source code of above program at:
      (I also add this program at Q.80)

      http://cprogrammingcodes.blogspot.in/2013/04/even-odd-number-star-pyramid.html

      Delete
  46. Can you please write this program? in c language
    1
    1*
    1*3
    1*3*
    1*3*5
    1*3*5*

    ReplyDelete
    Replies
    1. @Ateet Mishra,

      Your required program source code at:

      http://cprogrammingcodes.blogspot.in/2013/04/number-star-pyarmid.html

      Delete
  47. i want a program for this output

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

    ReplyDelete
    Replies
    1. @UMER NAWAZ,

      Your required program source code at:

      http://cprogrammingcodes.blogspot.in/2013/04/star-pyramid.html

      Delete
  48. for this output write a program....

    A
    * *
    A B C
    * *
    A


    *
    $ $
    * * *
    $ $ $ $


    1
    A B
    2 3 4
    C D E F
    5 6 7 8 9




    0
    -1 0 -1
    -2 -1 0 -1 -2
    -3 -2 -1 0 -1 -2 -3

    ReplyDelete
    Replies
    1. @Jannat Patel,

      Your required program source code, according your sequence as:

      http://cprogrammingcodes.blogspot.in/2013/04/character-symbol-pyramid.html

      http://cprogrammingcodes.blogspot.in/2013/04/differ-symbol-pyramid.html

      http://cprogrammingcodes.blogspot.in/2013/04/continue-character-number-pyramid.html

      http://cprogrammingcodes.blogspot.in/2013/04/odd-number-triangle_21.html

      Delete
  49. 10 9 8 7
    4 5 6
    3 2
    1
    i want a program for this output

    ReplyDelete
    Replies
    1. @Arulanandasamy Viyagulasamy,

      Your required program source code at:

      http://cprogrammingcodes.blogspot.in/2013/04/reverse-number-pyramid.html

      Delete
  50. code for
    ------------------*
    -------------*--------*
    ---------* -------*------*
    ---- * -----*----------*------*

    ReplyDelete
  51. Sir, I want the following pattern

    1
    1 3
    1 3 5
    1 3 5 7
    1 3 5 7 9

    ReplyDelete
    Replies
    1. @Muhammad Shoaib,

      Your required above program source code at:

      http://cprogrammingcodes.blogspot.in/2013/04/odd-number-triangle.html

      Delete
  52. Please do it:
    1
    2 3
    4 5 6
    7 8 9 10
    11 12 13
    14 15
    16

    ReplyDelete
  53. Don't know why white space not counted in comment. the pyramid will display from the center of screen.

    ReplyDelete
    Replies
    1. @Hridoy Ahmed,
      It's browser characteristics, if you make 2 or more space between characters, then its trim all spaces to single space.

      If you want to make 2 or more space between 2 characters, then use to dash ( - ), and also consider, in your comment that - as a space.

      Delete
  54. This comment has been removed by the author.

    ReplyDelete
  55. Write a program that prints an empty diamond. User enters the height of the diamond
    *
    * *
    * *
    * *
    *

    ReplyDelete
  56. can somebody help trying to write a program that looks like this. User enters number of rows

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

    ReplyDelete
  57. sir can you tell me how to print an empty diamond using for loop.

    ReplyDelete
  58. Sir, I want the following pattern

    ABCDEDCBA
    ABCD DCBA
    ABC CBA
    AB BA
    A A

    ReplyDelete
    Replies
    1. @Rohit,

      Your required program source code at:

      http://www.cprogrammingcodes.blogspot.in/2012/09/character-pyramid.html

      Delete
  59. Sir I am Highly thankful to your greatness.......
    You are the helping hand of new student of C language.

    Once again thanks from all new student alongwith me.

    Om Parkash

    ReplyDelete
  60. Please send me the logic of spacing in this program:

    1234554321
    1234 4321
    123 321
    12 21
    1 1

    ReplyDelete
    Replies
    1. @Muhammad Waqar Siddiqui,

      Your required program source code at:

      http://www.cprogrammingcodes.blogspot.in/2012/09/number-pyramid.html

      And for spacing you can put direct printf(" "); above last for loop or if you do not want to put space in first line of pyramid as above the put below condition above the last for loop as:

      if(n<num)
      printf(" ");

      Delete
  61. can you write this program

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

    ReplyDelete
    Replies
    1. @mr.cmp,

      Your required program source code at:
      (I also add this program at Q.82)

      http://cprogrammingcodes.blogspot.in/2013/05/nested-pyramid.html

      Delete
  62. hello,really impressed with collection and distribution.i need the code to print the following structure.
    a b b b
    b a b b
    b b a b
    b b b a

    using of comments preferred.

    ReplyDelete
    Replies
    1. @mrichat,

      Your required program source code at:

      http://cprogrammingcodes.blogspot.in/2013/05/dignal-character-pyramid.html

      Delete
  63. write a c program to count no.of occurences of 2's in a given range..
    Example: range: 10 - 30
    no.of 2's : 12 - one 2,20 -one two,21-one, 22- two 2's ,23- one two........

    ReplyDelete
    Replies
    1. @krish...d creator,

      Your required program source code at:

      http://cprogrammingcodes.blogspot.in/2013/05/count-digit-repetition-in-number-range.html

      Delete
  64. Plz tell me

    Write a c program take a no ex 9 and print like this

    1 2 3
    8 9 4
    7 6 5

    dynamically

    ReplyDelete
  65. *****A*****
    ****F****
    *** K***
    **P**
    *U*
    **T**
    ***O***
    **** J****
    *****E*****
    ....any one give me the follwing pattern code.....tnx

    ReplyDelete
  66. Sir, I want the following this diamond pattern, please help me,
    4
    434
    43234
    4321234
    43234
    434
    4

    ReplyDelete
    Replies
    1. @Dipayan,

      Your required program source code at:

      http://cprogrammingcodes.blogspot.in/2013/07/diamond-pattern-c-program.html

      Delete
  67. 0
    0 1
    0 1 2
    0 1 2 3
    0 1 2 3 4
    0 1 2 3
    0 1 2
    0 1
    0

    help me pls T.T

    ReplyDelete
    Replies
    1. @Alansmith symanyvanh,

      Your required program source code at:

      http://cprogrammingcodes.blogspot.in/2013/06/number-pyramidtriangle.html

      Delete
  68. i need the input of
    1
    3 5
    5 7 9
    7 9 11 13
    Help Please!

    ReplyDelete
    Replies
    1. @Jayxus Ch,

      Your required program source code at:

      http://cprogrammingcodes.blogspot.in/2013/07/odd-number-pyramid.html

      Delete
  69. i need pgm for
    1
    12
    123
    1234
    123
    12
    1

    ReplyDelete
    Replies
    1. @Suganya Sekar,

      Your required program source code at:

      http://cprogrammingcodes.blogspot.in/2013/07/number-triangle.html

      Delete
  70. 1111111
    1A1AAAA
    1AA1AAA
    1AAA1AA
    1AAAA1A
    1AAAAA1
    1111111

    ReplyDelete
    Replies
    1. @ZAID ARKAGA,

      Your required program source code at:

      http://cprogrammingcodes.blogspot.in/2013/07/number-character-pattern.html

      Delete
  71. Output should be:
    7
    14 15
    28 29 30 31
    56 57 58 59 60 61 62 63


    please help me

    ReplyDelete
    Replies
    1. @Deepak Sagare,

      Your required geometric sequence number pyramid program source code at:
      (I also add this program at Q. 89)

      http://cprogrammingcodes.blogspot.in/2013/08/binary-geometric-number-pyramid.html

      Delete
  72. # # # # # * # # # # #
    # # # # * # * # # # #
    # # # * # # # * # # #
    # # * # # # # # * # #
    # * # # # # # # # * #
    * # # # # # # # # # *
    Please tell me this progame

    ReplyDelete
    Replies
    1. @Umair Anwar,

      Your required nested hash-star pyramid C program source code at:
      (I also add this program at Q. 90)

      http://cprogrammingcodes.blogspot.in/2013/08/nested-star-hash-pyramid.html

      Delete
  73. how can i get this output

    *
    * - *
    * - - - *
    * - - - - - *
    the code should commence like this
    #include
    int main()
    {
    int i,j;

    ReplyDelete
  74. hello sir wil you please give code for this program i worked fot it but its not working for me.

    Method should accept two parameters.First parameter is first number to display, second parameter should be number of rows to be printed.Any programming language is fine

    7

    14 15

    28 29 30 31

    56 57 58 59 60 61 62 63

    ReplyDelete
    Replies
    1. @murali,

      Elaborate your problem with example.

      I not understand what should be do with second parameter and how much its print the number?

      Delete
    2. @Murali,

      Your required geometric sequence number pyramid program source code at:
      (I also add this program at Q. 89)

      http://cprogrammingcodes.blogspot.in/2013/08/binary-geometric-number-pyramid.html

      Delete
  75. Plz tell me the c program code of this logic:
    if I enter number = any n digit number then output looks like:
    number = 1234
    output:
    1234
    234
    34
    4

    or if i enter number = 86745
    o/p:
    86745
    6745
    745
    45
    5
    plz help me....i'll waiting to get this code

    ReplyDelete
    Replies
    1. @Sonia Gupta,

      Your required program source code at:
      (I also add this program at Q. 83)

      http://cprogrammingcodes.blogspot.in/2013/07/random-number-pyramid.html

      Delete
  76. Could you please provide solution for this..
    For a given string "computer"
    Display it as

    c
    om
    put
    er==

    ReplyDelete
  77. //Java experts..Please, can anyone help me to make a program that will display the following output:

    a.1----------b 321---------c. 123
    ---22-----------21--------------12
    ---333----------1---------------1

    //dont mind the broken lines, i just place it so that the digit will not compress when i publish it to this blog.

    //Thank you so much in advance to the one who can solve this :)

    ReplyDelete
    Replies
    1. @Angel Tamayo,
      Can you describe the your desired solution.

      Please mention the output with proper spacing with broken lines, And also after the 'a' character is a point (.) and after 'b' character blank space, and what about 'c' character.

      Delete
  78. Hello Sir,

    This site helps me alot to crack interview.

    Thank you so much

    ReplyDelete
    Replies
    1. You’re welcome Divya, I'm gald C Pyramids programs are useful.
      Thanks for feedback.

      Delete
  79. hello good day sir..,can u help me with this pattern..,

    *000000000
    0*00000000
    00*0000000
    000*000000
    0000*00000
    00000*0000
    000000*000
    0000000*00
    00000000*0
    000000000*

    ReplyDelete
    Replies
    1. @Yendohr,

      Your required diagonal star-zero rectangle program as:
      (I also add this program at Q. 88)

      http://cprogrammingcodes.blogspot.in/2013/08/diagonal-star-and-zero-rectangle.html

      Delete
  80. 1
    1 2 1
    1 2 3 1
    1 2 3 4 1
    1 2 3 4 5 1



    i need the code for this...........

    ReplyDelete
    Replies
    1. @Sajeesh,

      Your required Number Triangle Design C program at:
      (I also add this program at Q. 85)

      http://cprogrammingcodes.blogspot.in/2013/08/number-triangle-design.html

      Delete
  81. Write a simple C program to get the following output?Need ur urgent help
    *************
    *
    *
    *
    *
    *
    *
    *

    ReplyDelete
    Replies
    1. @ Mr. Apple,

      Your required reverse L-Shape pyramid C program at:

      http://cprogrammingcodes.blogspot.in/2013/08/reverse-l-shape-pyramid.html

      Delete
  82. source code of pascal triangle anyone please
    1
    1 1
    1 2 1
    1 3 3 1

    ReplyDelete
    Replies
    1. @Ankit Jain,

      Your required pascal triangle source code at:

      http://cprogrammingcodes.blogspot.in/2012/02/pascal-triangle.html

      Delete
  83. hello sir wil u please help me with this program......

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

    ReplyDelete
    Replies
    1. @Arpita,

      Your required star pyramid C program at:

      http://cprogrammingcodes.blogspot.in/2013/08/c-star-triangle.html

      Delete
  84. please give me the source code for

    1
    2*2
    3*3*3
    4*4*4*4
    4*4*4*4
    3*3*3
    2*2
    1

    ReplyDelete
    Replies
    1. @Sindhuja,

      Your required Alternate Number-Star pyramid program as:
      (I also add this program at Q. 87)

      http://cprogrammingcodes.blogspot.in/2013/08/alternate-number-star-pyramid.html

      Delete
  85. can you please help me to do this
    program that will display a pattern depending on the value of n entered by the user.
    n=4
    *-----*
    -*---*
    --*-*
    ---*
    - is spacing
    thanks in advance

    ReplyDelete
    Replies
    1. @Delmar del Prado

      Your required V-Shape pyramid program at:

      http://cprogrammingcodes.blogspot.in/2013/09/v-shape-pyramid.html

      Delete
    2. This comment has been removed by the author.

      Delete
  86. i want this input output:(Ignore (.))
    .543212345.
    ..4321234..
    ...32123...
    ....212....
    .....1.....

    ReplyDelete
    Replies
    1. @Nirav,

      Your required Half-Square Number Pyramid source code at:
      (I also add this program at Q.91)

      http://cprogrammingcodes.blogspot.in/2013/09/half-square-number-triangle.html

      Delete
  87. Replies
    1. @Nirav,

      Your required Decreased Number Triangle C program source code at:

      http://cprogrammingcodes.blogspot.in/2013/09/decreased-number-triangle.html

      Delete
  88. Replies
    1. @Nirav Rathod,

      Kindly check first above list of pyramid, Your will find your solutions as
      Your above number pyramid program is Q.28

      http://cprogrammingcodes.blogspot.in/2012/02/number-triangle-equal.html

      Delete
  89. Replies
    1. @Nirav,

      Your above pyramid program is Q.3 available.

      http://cprogrammingcodes.blogspot.in/2011/09/3design-tringle-praymid.html

      Delete
  90. Ignore-(_);

    _________________1
    ________________21
    _______________321
    ______________4321
    _____________54321

    ReplyDelete
    Replies
    1. @Nirav,

      Your required triangle program source code at:

      http://cprogrammingcodes.blogspot.in/2013/09/z-shape-pyramid.html

      Delete
  91. ignore(_);

    ________________5
    _______________45
    ______________345
    _____________2345
    ____________12345

    ReplyDelete
    Replies
    1. @Nirav Rathod,

      YOur required increased number triangle C program source code at:

      http://cprogrammingcodes.blogspot.in/2013/09/increased-number-triangle.html

      Delete
  92. good day sir,
    can you help me,
    i making a program that when u input a number for example 1234
    the output will be like this

    0 1 2 3 4
    1 2 3 4
    2 3 4
    3 4
    4

    hope you can help me,
    thank you!

    ReplyDelete
  93. ignore(_);

    _____________5
    ____________454
    ___________34543
    __________2345432
    _________123454321

    ReplyDelete
    Replies
    1. @Nirav,

      Your required Equilateral Triangle Number Design source code at:
      (I also add this program at Q.92)

      http://cprogrammingcodes.blogspot.in/2013/09/equilateral-triangle-number-design.html

      Delete
  94. CAN WE MAKE ZOO ZOOS(VODAFONE ZOO-ZOOS)WITH THIS PROGRAMMING?

    ReplyDelete
    Replies
    1. @Nirav, C is not high level language, it has some features of Hight level language.
      We can make some basic graphic line, curve through C.

      Delete
  95. Hello,
    Can you please suggest me some logic related to following pattern
    if suppose n = 9 and r = 5 then
    output should be:
    9
    8 6
    7 5 3
    4 2 0 -2
    1 -1 -3 -5 -7

    ReplyDelete
    Replies
    1. @Pratik Bhavsar,

      Your above required Positive Negative Number Triangle source code.
      (I also add this program at Q.93)

      Delete
    2. Thank you very much.
      program works fine for above inputs.
      but I have to make it generic so that it can work for any input
      n and r.:)

      Delete
    3. I found the solution which works for any input:

      #include

      int main()
      {
      int i,j,n,r,even,odd,flag = 0;

      printf("Enter first number to print: ");
      scanf("%d",&n);

      printf("Enter number of rows to print: ");
      scanf("%d",&r);

      if(n % 2 == 0)
      {
      even = n;
      odd = n-1;
      flag = 0;
      }
      else
      {
      even = n-1;
      odd = n;
      flag = 1;
      }

      for(i = 1; i <= r; i++)
      {
      for(j = 1; j <= i; j++)
      {
      if(flag == 0)
      {
      printf("%d ",even);
      even = even - 2;
      }
      else
      {
      printf("%d ",odd);
      odd = odd - 2;
      }
      }
      printf("\n");
      if(flag == 0)
      {
      flag = 1;
      }
      else
      {
      flag = 0;
      }
      }
      }


      Thank you.

      Delete
  96. Replies
    1. @Emann Ladimo,

      Your required number pattern pyramid C program Source code.

      Delete
  97. what to do here?
    2
    2 4
    2 4 6
    2 4 6 8

    ReplyDelete
    Replies
    1. @Pranav Sinha,

      Your required even number pattern C program source code.

      Delete
    2. Hello thankyou for your concern but actually what i wanted was
      -2-
      -2 - 4-
      -2- 4 - 6-
      its a triangular pyramid like an equilateral triangle and not like a right angled triangle which is stuck to the margin. so can u pls rewrite it....

      Delete
  98. write a c program to print this?
    A
    A B
    A B A
    A B B A

    ReplyDelete
  99. Can someone provide the program for the following pattern in C#-

    A
    B B
    C C C
    D D D D
    E E E E E
    F F F F F F
    E E E E E
    D D D D
    C C C
    B B
    A
    Many thanks in advance.

    ReplyDelete
    Replies
    1. Hello frnd you can try this:

      int main()
      {
      int i,j;
      char c = 'A';
      for(i = 0 ; i < 6; i++)
      {
      for(j = 0; j <= i; j++)
      printf("%c ",c);
      printf("\n");
      if(i != 5)
      c++;
      }
      c--;
      for(i = 6 ; i > 0; i--)
      {
      for(j = 0; j < i-1; j++)
      printf("%c ",c);
      printf("\n");
      c--;
      }
      return 0;
      }

      Delete
  100. *000*000*
    0*00*00*0
    00*0*0*00
    000***000

    Can you help me with this using turbo c? Thanks in advance!

    ReplyDelete
    Replies
    1. @John Paulo Immanuel Carillo,

      Your required star-zero nested pattern C program source code.

      (I also add this pattern program at Q.94)

      Delete
  101. plz Help me Sir,, to Print following Output using "Nested Loop"
    *
    ***
    *****
    *******
    *********
    *******
    *****
    ***
    *

    ReplyDelete
  102. any one help me to code ths pyramid???
    0
    1 0
    0 1 0
    1 0 1 0
    0 1 0 1

    and i m written code for ths pyramid s
    #include
    #include
    void main()
    {
    int i,j,a,b,n;
    clrscr();
    printf("\nENter the no. of rows:\n");
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
    a=0;
    b=1;
    for(j=1;j<=i;j++)
    {
    if(i%2 != 0)
    {
    printf("%d\t",a);
    if(a==0)
    a=1;
    else
    a=0;
    }
    else
    {
    printf("%d\t",b);
    if(b==1)
    b=0;
    else
    b=1;
    }
    }
    printf("\n");
    }
    getch();
    }
    it s optimized code r not???

    ReplyDelete
  103. cn u help me wid dis program
    A
    AB
    ABC
    ABCD
    ABCDE
    ABCDEF

    using C++

    ReplyDelete
  104. Sir! Im having a tough time having the right code for our project. I hope u can help us ASAP. we need to pass it tomorrow.

    the output is:
    Seed=3 Size=4

    3456
    789
    01
    2

    ReplyDelete
  105. Sir i want code to print * in below fashion
    please send me
    * * * * * * * *
    * * * *
    * * * *
    * * * *
    * *
    * * * *
    * * * *
    * * * *
    * * * * * * * *

    ReplyDelete