Star Pattern Triangle Shape in C-Language
One of the easy understanding method for print triangle star patten in C.
Rectangle shape pattern code is usefull for reference to print triangle or any other pattern.
Simply “Rectangle patten code” is basic “block – diagram” for diffent kind of patterns.
void main() { int i,j,n; printf("enter n value \n"); scanf("%d",&n); for(i=1;i<=n;i++) { for(j=1;j<=i;j++) { if(j<=i) printf("*"); else printf(""); } printf("\n"); } getch(); }