Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
367 B
1
Indexable
Never
#include <iostream>
using namespace std;
int main()
{
	int a,i,n,j;
	cin >> n;
	for (i = 0; i < n; i++)
	{
		j = 0;
		if (i == 0 || i == n - 1) {
			for (j = 0; j < n; j++)
			{
				cout << "1";
			}
		}
		else {
			for (j = 0; j < n; j++)
			{
				if (j == 0 || j == n - 1) cout << "1";
				else cout << "0";
			}

		}
		cout << "\n";
	}
}