Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main() {
- int n;
- cin >> n;
- for (int a = 1; a <= n; a = a + 1) {
- for (int b = 1; b <= n; b = b + 1) {
- if (b == 1 || b == n)
- cout << "*";
- else if (a == 1 || a == n)
- cout << "*";
- else
- cout << " ";
- }
- cout << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement