I just got it now. Here's my final code.
Code:
#include<stdio.h>
int main(void)
{
int wid, len, w, x, y, z;
printf("Enter the number for length: ");
scanf("%d", &len);
printf("Enter the number for width: ");
scanf("%d", &wid);
for(x=1;x<=len;x++)
printf("*");
for(y=1;y<=wid-2;y++)
{printf("\n*");
for(z=1;z<=len-2;z++)
printf(" ");
printf("*");}
printf("\n");
for(w=1;w<=len;w++)
printf("*");
return 0;
}
I'm sure there's a better way to code it but that's all my mind can do for now. Thank you guys. God bless.