## 9.01.2011

### 4.Design triangle pyramid

Q. Write a program to generate a following #'s triangle?

 # # # # # # # # # # # # # # #
Ans.

/* c program for symbol triangle*/
#include<stdio.h>
#include<conio.h>
int main()
{
int num,r,c;
printf("Enter loop repeat number(rows): ");
scanf("%d",&num);
for(r=1; num>=r; r++)
{
for(c=1; c<=r; c++)
printf("#");
printf("\n");
}
getch();
return 0;
}

/*************OUTPUT**************
Enter loop repeat number(rows): 5

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

***********************************/

1. print pattern of stars
*
***
******

1. Your required star pattern source code at:

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

2. Get the marks of student and print the average marks...
plzzzzzzzzzz tell me urgently

1. Your required student gets marks, calculate percentage and division C program at:

http://cprogrammingcodes.blogspot.in/2012/10/get-student-marks-and-calculate.html

3. *
* *
* * *
* *
*
Plz tell me the source for this o/p

1. @Uma,
Your required program source code at:

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

4. Design a program that will display a triangle using ‘*’ characters. The user is to be prompted to enter the number of rows to be displayed within the range 3-9, the
program should loop continuously using a do-while loop until a valid number of rows has been
entered.

5. 1
12
123
1234

1. @Ghazanfar,

your required program source code at:

http://cprogrammingcodes.blogspot.in/2011/09/10design-numbers-tringle-pyramid.html

6. 0000*
000**
00***
0****

1. #include
main()
{
int i,j,k,n;
printf("Enter the number of rows");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(k=n;k>i;k--)
{
printf("0");
}
for(j=0;j<i;j++)
{
printf("*");
}

printf("\n");
}
}

7. hi there, i really2 need your help to print this output by using function prototype.

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

8. #include
main()
{
int i,j,k,n;
printf("Enter the number of rows");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
/* for(k=1;k<i;k++)
{
printf(" ");
}*/
for(j=1;j<=i;j++)
{
printf("#");
}

printf("\n");
}
}

9. can you make the flowchart for "*" pyramid?..plz snd anyone

10. please tell me its algorithm
*
* *
* * *
* * * *
* * * * *