Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 30 lines (24 sloc) 0.387 kb
#include<stdio.h>
// Star patterns ...
int main()
{
int i,j,n;
printf("\n Enter the value of n");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=n-i;j++)
printf(" ");
for(j=1;j<=i;j++)
printf(" ""*");
printf("\n");
}
for(i=1;i<=n;i++)
{ for(j=1;j<=i;j++)
printf(" ");
for(j=1;j<=(n-i);j++)
printf(" ""*");
printf("\n");
}
return 0;
}
Jump to Line
Something went wrong with that request. Please try again.