Tuesday, August 13, 2019

Print Star triangle

Print Star Triangle:


print star triangle in cprograms.


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

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

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

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

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

}

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


EmoticonEmoticon