Tuesday, August 13, 2019

Print Star triangle

 Print Star Triangle:


print triangle in cprograms.



     *
    ***
   *****
  *******
 *********

#include<stdio.h>
#include<conio.h>

void main()
{
int i,j,k,l;
clrscr();
for(i=1;i<=5;i++)
{

for(j=5;j>=i;j--)
{
printf("0");
}

for(k=1;k<=2*i-1;k++)
{
printf("*");

}

printf("\n");
}
getch();
}


EmoticonEmoticon