空心四邊形

 avatar
user_6817964
c_cpp
2 years ago
318 B
1
Indexable
Never
#include <stdio.h> // printf
int main()
{
	int n;
	scanf_s("%d", &n);
	for (int i = 1; i <= n; i++) {
		printf("*");
	}
	for (int j = 2; j < n; j++) {
		printf("\n*");
			for (int k = 2; k < n; k++)
				printf(" ");
		printf("*");
	}
	printf("\n");
	for (int i = 1; i <= n; i++) {
		printf("*");
	}
}