nvnnaidenov

SquareOfStars

Oct 28th, 2021
974
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int n;
  9.  
  10.     cin >> n;
  11.     cout << string(n, '*') << endl;
  12.     for (int i = 0; i < n - 2; i++)
  13.     {
  14.         cout << "*" << string(n - 2, ' ') << "*" << endl;
  15.     }
  16.     cout << string(n, '*') << endl;
  17.  
  18.     return 0;
  19. }
RAW Paste Data