Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void dash(int x, string c) {
- cout << " ";
- for (int i = 0; i < x; i++) {
- cout << " " << (c == "*" ? std::to_string(i) : c) << " ";
- }
- cout << endl;
- };
- int main() {
- int arrSizeRow = 10;
- int arrSizeColumn = 10;
- dash(arrSizeColumn, "*");
- for (int i = 0; i < arrSizeRow; i++) {
- dash(arrSizeColumn, "-");
- cout << i << " |";
- for (int j = 0; j < arrSizeColumn; j++) {
- cout << " |";
- }
- cout << endl;
- }
- dash(arrSizeColumn, "-");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement