#include<stdio.h>
int main()
{
 int n;
 printf("Enter the height of the upper half of the diamond(1 to 10):");
 scan f("%d",&n);
 if(n<1||n>10)
 {
  printf("invalid input" enter a number between 1 and 10.\n");
  return 1;
  )
  for(int i=1;i<=n;i++)
  {
    for int j=1;j<n;j++)
    {
        print("");
    }
     for (int k=1;k<=(2*i-1);k++)
     {
         printf("*")
     }
      printf("\n");
  }
   return o;