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