Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n,i,j;
- char c,d;
- cin>>n>>c>>d;
- for(i=1; i<=n; i++)
- cout<<c;
- cout<<'\n';
- for(i=2; i<=n-1; i++)
- {
- cout<<c;
- for(j=2; j<=n-1; j++)
- cout<<d;
- cout<<c<<'\n';
- }
- for(i=1; i<=n; i++)
- cout<<c;
- cout<<'\n';
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement