Star Pattern2

Click On Image To ZOOM
//Code

#include<stdio.h>
main()
{
int i,j,k,n;
printf("Enter no of lines\n");
scanf("%d",&n);
for(i=0;i<n;i++)
{
for(j=n;j-i>0;j--)
{
printf(" ");
}
for(k=0;k<=i;k++)
{
printf("* ");
}
printf("\n");
}
}

No comments:

Post a Comment