Advertisement
Guest User

Untitled

a guest
Jan 20th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6. int n, m;
  7. cin >> n >> m;
  8.  
  9. for (int i = 0; i < n; i++) {
  10. for (int j = 0; j < m; j++) {
  11. if (j == 0 || j == m - 1)
  12. cout << 'x';
  13. else if (i == 0)
  14. cout << 'x';
  15. else if (i == n - 1)
  16. cout << 'x';
  17. else
  18. cout << ' ';
  19.  
  20. }
  21. cout << endl;
  22. }
  23. system("pause");
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement