programming-examples/c/Pattern_Programs/Star 6.c
2019-11-15 12:59:38 +01:00

33 lines
470 B
C

/*
*
**
* *
* *
* *
* *
* *
* *
* *
* *
* *
************
--*/
#include<stdio.h>
void main()
{
int num,r,j,s;
printf("Enter no of rows: ");
scanf("%d", &num);
printf("\n*\n");
for(r=1; r<=num; r++)
{
printf("*");
for(s=1; s<r; s++)
printf(" ");
printf("*\n");
}
for(j=1; j<=num+2; j++)
printf("*");
}