Saturday, August 10, 2019

Star Pattern in cprograms

Star Pattern in Cprograms:

star patterns in cprograms


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


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

void main()
{
int i,j;
clrscr();
for(i=1;i<=5;i++)
{
for(j=5;j>=1;j--)
{
if(i>=j)
{
printf("*");
}
else
{
printf(" ");
}
}
printf("\n");
}
getch();
}


EmoticonEmoticon