-
PRANAV VIKRAMAN authoredPRANAV VIKRAMAN authored
S.c 414 B
#include <stdio.h>
int main(){
int n;
printf("Enter the limit (prefer odd number):");
scanf("%d", &n);
for(int i=1; i<=n; i++){
for(int j=1; j<=n; j++){
if((i==1&&j<=n)||(i==n&&j<=n)||(j==1&&i<=(n+1)/2)||(i==(n+1)/2&&j<=n)||(j==n&&i>=(n+1)/2)){
printf("*");
} else{
printf(" ");
}
}
printf("\n");
}
}