Advertisement
Anon2005

Erich

Jan 16th, 2021
944
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.     int n,i,j;
  6.     char c,d;
  7.     cin>>n>>c>>d;
  8.     for(i=1; i<=n; i++)
  9.         cout<<c;
  10.     cout<<'\n';
  11.     for(i=2; i<=n-1; i++)
  12.     {
  13.         cout<<c;
  14.         for(j=2; j<=n-1; j++)
  15.             cout<<d;
  16.         cout<<c<<'\n';
  17.     }
  18.     for(i=1; i<=n; i++)
  19.         cout<<c;
  20.     cout<<'\n';
  21.     return 0;
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement