#include<stdio.h>

int main()
{
int n,i,j;
printf("Enter the height of the upper half of the diomond(1-10):");
scanf("%d",&n);
if (n-1||n>10)
{
printf("Invalid input\n");
return 0;
}
fori=1;i<=n;i++);
{
for(j=1;j<=n-i;j++)
{
printf(" ");
}
for(j=1;j<=i;j++)
{
printf("*");
}
printf("\n");
}
for(i=n-1;i>=1;i--)
{
for(j=1;j<=n-i;j++)
{
printf("*");
}
printf("\n");
}
return 0;
}