## INDEX

### Pyramid

Note:

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

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

 # # # # # # # # # # # # # # #

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

 # # # # # # # # # # # # # # #

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

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.

1
21
321
4321
54321

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

EDCBA
DCBA
CBA
BA
A

Q.43

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

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

Q. 57

1
3  5  7
9 11 13 15 17 19

Q.58

54321
5432
543
54
5

Q.59

1
AB
123
ABCD
12345

Q. 60

1
2 3
4 5 6
7 8 9 10

Q.61

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

Q.62

A
BA
ABA
BABA
ABABA

Q.63if entered number by user is 7 then output would be:

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

Q.64

1
232
34543
4567654

Q.65

12321
12 21
1   1
12 21
12321

Q.66

ABCBA
AB BA
A   A
AB BA
ABCBA

Q.67

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

Q.68

1234
2341
3412
4123

Q.69

ABCD
BCDA
CDAB
DABC

Q.70

1234
341
12
3

Q.71

ABCD
CDA
AB
C

Q.72

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

Q.73

1
123
12345
1234567

Q.74

1333
2222
3331

Q.75

1      a
21     ba
321    cba
4321   dcba
54321  edcba

Q.76

1
01
010
1010
10101

Q.77

1
01
101
0101
10101

Q.78

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

Q.79

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

Q.80

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

Q.81

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

Q.82

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

Q.83  Print any random number pyramid as:

4572
572
72
2

1
23
4
56
7
89
10

1
121
1231
12341
123451

1
121
12321
1234321
123454321

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

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

Q.89

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

Q.90

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

543212345
4321234
32123
212
1

5
454
34543
2345432
123454321

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

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

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.

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

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 :)

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 :)

3. @Richard,

Your required below program source code.

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.

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;
}

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");
}
}

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 :)

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

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)

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

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

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

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

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

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

7. plz give progam of
A
BA
ABA
BABA
ABABA

1. @py4408,
(I also add this program Q.62 )

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

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

9. pls give me source for this :

9
898
78987
6789876

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)

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

1. @Gurpreet Singh,

Source code for your above program at:

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

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

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

1
3 5 7
9 11 13 15 17

i.e. ODD SERIES in pyramid form.

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

13. how to create please tell me ..

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

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

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

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

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

15. Consider it as a pyramid !

16. Sir i need a source code for this ..

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

here - accounts for a space .. pl help!

1. @Mohitthefuturemessi,

Your required pyramid code source code at:

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

17. please give me the source code of ....

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

1. @Mohitthefuturemessi,

Your required number pyramid source code at:

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

18. 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
*
* *
* * *
* * * *
* * *
* *
*

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

19. please give me the source code of ....

ABCBA
AB BA
A A
AB BA
ABCBA

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

20. This comment has been removed by the author.

21. i need this output..
1
232
34543
4567654

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

22. *********
*******
*****
***
*
plz give me coding for this digram

1. @Lochan sao,
(I also add this program at Q.67)

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

23. ABCD
CDA
AB
C

1. @Dashami Umesh,
(I also add this program at Q.71)

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

25. This comment has been removed by the author.

26. using function

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

if there were five rows...

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

27. i want this c code
1
123
12345
1234567

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

28. program to dsplay the following pattern
1 3 3 3
2 2 2 2
3 3 3 1

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

29. This comment has been removed by the author.

30. can u give me the code for following pattern

1______a
21_____ba
321____cba
4321___dcba
54321__edcba

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

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

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?

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

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

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

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();
}

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

34. Program for
0
101
21021
3210123

1. @PATIL VAMSI KRISHNA REDDY,

Your required program source code at:

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

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

1. @Jash Kothari,

Your required program source code at:

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

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

37. D C B A
D C B
D C
B

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();
}

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

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();
}

39. 1
121 1 121
12321 121 1 121 12321

program to make this pyramid

40. Pls Help

1
11
2222
333333
44444444
5555555555

1. @Shivinder Chandok,

Your required program source code at:

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

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();
}

41. 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

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();
}

42. Sir,I Want the Output of this

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

1. @Ujaan Nandy,

Your required program source code at:

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

43. 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

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

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

45. Can you please write this program?

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

1. @Jimish Shah,

Your required program source code at:

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

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

1. @Ateet Mishra,

Your required program source code at:

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

47. 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

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

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

1. @Ateet Mishra,

Your required program source code at:

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

49. i want a program for this output

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

1. @UMER NAWAZ,

Your required program source code at:

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

50. 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

1. @Jannat Patel,

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

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

1. @Arulanandasamy Viyagulasamy,

Your required program source code at:

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

52. code for
------------------*
-------------*--------*
---------* -------*------*
---- * -----*----------*------*

53. Sir, I want the following pattern

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

Your required above program source code at:

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

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

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

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.

56. This comment has been removed by the author.

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

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

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

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

60. Sir, I want the following pattern

ABCDEDCBA
ABCD DCBA
ABC CBA
AB BA
A A

1. @Rohit,

Your required program source code at:

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

61. 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

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

1234554321
1234 4321
123 321
12 21
1 1

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(" ");

63. can you write this program

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

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

64. 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

1. @mrichat,

Your required program source code at:

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

65. 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........

1. @krish...d creator,

Your required program source code at:

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

66. 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

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

4
434
43234
4321234
43234
434
4

1. @Dipayan,

Your required program source code at:

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

69. 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

1. @Alansmith symanyvanh,

Your required program source code at:

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

70. i need the input of
1
3 5
5 7 9
7 9 11 13

1. @Jayxus Ch,

Your required program source code at:

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

71. i need pgm for
1
12
123
1234
123
12
1

1. @Suganya Sekar,

Your required program source code at:

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

72. 1111111
1A1AAAA
1AA1AAA
1AAA1AA
1AAAA1A
1AAAAA1
1111111

1. @ZAID ARKAGA,

Your required program source code at:

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

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

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

74. # # # # # * # # # # #
# # # # * # * # # # #
# # # * # # # * # # #
# # * # # # # # * # #
# * # # # # # # # * #
* # # # # # # # # # *

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

75. how can i get this output

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

76. 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

1. @murali,

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

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

77. 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

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

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

c
om
put
er==

79. //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 :)

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.

80. Hello Sir,

This site helps me alot to crack interview.

Thank you so much

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

81. 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*

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

82. 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...........

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

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

1. @ Mr. Apple,

Your required reverse L-Shape pyramid C program at:

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

84. source code of pascal triangle anyone please
1
1 1
1 2 1
1 3 3 1

1. @Ankit Jain,

Your required pascal triangle source code at:

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

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

1. @Arpita,

Your required star pyramid C program at:

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

86. 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

1. i didnt find

2. @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

3. thanks a lot...

program that will display a pattern depending on the value of n entered by the user.
n=4
*-----*
-*---*
--*-*
---*
- is spacing

Your required V-Shape pyramid program at:

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

2. This comment has been removed by the author.

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

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

89. 5
54
543
5432
54321

1. @Nirav,

Your required Decreased Number Triangle C program source code at:

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

90. 1
22
333
4444
55555

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

91. * * * * *
* * * *
* * *
* *
*

1. @Nirav,

Your above pyramid program is Q.3 available.

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

92. Ignore-(_);

_________________1
________________21
_______________321
______________4321
_____________54321

1. @Nirav,

Your required triangle program source code at:

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

93. ignore(_);

________________5
_______________45
______________345
_____________2345
____________12345

1. @Nirav Rathod,

YOur required increased number triangle C program source code at:

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

94. 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!

95. ignore(_);

_____________5
____________454
___________34543
__________2345432
_________123454321

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

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

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.

97. 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

1. @Pratik Bhavsar,

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

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.:)

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.

98. 1 2 3 4 5
2 3 4 5
3 4 5
4 5
5

Your required number pattern pyramid C program Source code.

99. what to do here?
2
2 4
2 4 6
2 4 6 8

1. @Pranav Sinha,

Your required even number pattern C program source code.

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....

100. write a c program to print this?
A
A B
A B A
A B B A

101. 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

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;
}

102. *000*000*
0*00*00*0
00*0*0*00
000***000

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

1. @John Paulo Immanuel Carillo,

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

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

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

104. 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???

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

using C++

106. 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

107. Sir i want code to print * in below fashion