#include<stdio.h>
void main()
{
int i,j,r=6;
clrscr();
for(i=1;i<=r;i++)
{
for(j=r;j>=i;j--)
{
printf("*");
}
printf("\n");
}
getch();
}
Tech Programming Ideas is one of the best places on the programming for programmers. Learn coding with Tech Programming Ideas tutorials. We are covered android programming, php, yii2 framework, javascript, mysql, vb.net etc.
#include<stdio.h>
void main()
{
int i,j,r=6;
clrscr();
for(i=1;i<=r;i++)
{
for(j=r;j>=i;j--)
{
printf("*");
}
printf("\n");
}
getch();
}
Output
Source Code
#include<stdio.h>
void main()
{
int i,j,k,rows=7;
clrscr();
for(i=1;i<=rows;i++)
{
//print blank space
for(j=1;j<=rows;j++)
{
if((i+j)<=rows)
printf(" ");
else
printf("*");
}
printf("\n");
}
getch();
}
Video