#include<stdio.h>
int main ()
{
printf(“Program to print a pattern of stars.\n”);
int i1,i2,i3,val;
printf(“Enter a number:\n”);
scanf(“%d”,&val);
for(i1=0;i1<val*2;i1=i1+2)
{
for(i3=val*2;i3>i1;i3=i3-2)
{
printf(” “);
}
for(i2=0;i2<=i1;i2++)
{
printf(“*”);
}
printf(“\n”);
}
return 0;
}