在做的,“哥哥”,“姐姐”,“叔叔”,“阿姨”,小兄弟向你们请教个问题……
程序代码:#include <stdio.h>
int main (void)
{
int width;
int heighth;
int y;
int x;
printf("Please input WIDTH:");
scanf("%d", &width);
printf("Please input HEIGHTH:");
scanf("%d", &heighth);
for (y = 1; y <= heighth; y++)
{
for (x = 1; x <= width; x++)
{
if (x-1==0 || x-width==0 || y-1==0 || y-heighth==0)
printf("%-2c", '*');
else
printf("%-2c", ' ');
}
printf("\n");
}
return 0;
}其中的x-1==0; x-width==0; y-1==0; y-heighth==0;。不懂,给我讲讲吧……









