Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void dash(int x, string c) {
  5. cout << " ";
  6. for (int i = 0; i < x; i++) {
  7. cout << " " << (c == "*" ? std::to_string(i) : c) << " ";
  8. }
  9. cout << endl;
  10. };
  11.  
  12. int main() {
  13. int arrSizeRow = 10;
  14. int arrSizeColumn = 10;
  15. dash(arrSizeColumn, "*");
  16. for (int i = 0; i < arrSizeRow; i++) {
  17. dash(arrSizeColumn, "-");
  18. cout << i << " |";
  19. for (int j = 0; j < arrSizeColumn; j++) {
  20. cout << " |";
  21. }
  22. cout << endl;
  23. }
  24. dash(arrSizeColumn, "-");
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement