#include<stdio.h>
#include<conio.h>
void main()
{
int
i,n,j;
scanf("%d",&n);
printf("\n\n");
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
if(i==0||j==0||(i==n-1&&j<=n/2+1)||(j==n-1&&i>=n/2)||(j==n/2+1&&i>=n/2)||(i==n/2&&j>=n/2+1))
{
printf("*");
}
else
{
printf(" ");
}
}
printf("\n");
}
}
No comments:
Post a Comment