C pattern 1

      No Comments on C pattern 1
#include<stdio.h>
#include<conio.h>
void main()
{
int i,x,j;
clrscr();
for(i=1;i<=5;i++)
 {
  for(j=1;j<=5-i;j++)
   {
    printf(" ");
   }
   for(x=1;x<=i;x++)
    {
     printf("*");
    }
   printf("\n");
 }
 getch();
}

OUTPUT:-

pattern 1

Leave a Reply

Your email address will not be published. Required fields are marked *