#include "stdio.h"
#include "conio.h"
void main()
{
int n,i,j,k;
clrscr();
printf("Enter Number of lines: ");
scanf("%d",&n);
printf("\n");
for(i=1;i<=n;i++)
{
for(j=1;j<=n-i;j++)
printf(" "); /* Printing Space(s) */
for(k=1;k<=2*i-1;k++)
printf("*");
printf("\n"); /* Changing Line */
}
getch();
}
Friday, June 26, 2009
PROGRAM TO GENERATE THE PYRAMID OF *'S
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment