#include<iostream>
#include<math.h>
using namespace std;
int main()
{
int i,j,k,l,n,m;
cout<<"Enter the number of rows :""\n";
cin>>n;
for(i=0;i<n;i++)
{
cout<<"\n";
for(k=(n-i);k>0;k--)
{ cout<<" ";}
if(i==0)
{
cout<<"*";
continue;}
if(i==(n-1))
{
for(j=0;j<((2*n)-1);j++)
{ cout<<"*";}
break;
}
cout<<"*";
for(l=fabs(2*i-1);l>0;l--)
{
cout<<" ";
}
cout<<"*";
}
cout<<"\n";
system ("pause");
return 0;
}