#include <iostream>
using namespace std;
int main()
{
int a, b;
char c, d;
cin >> a >> b >> c >> d;
for (int row = 1; row <= a; row++ ){
cout << c;
for (int cols = 1; cols <= b; cols++){
cout << d;
}
}
cout << c;
}
// this code outputs
Sample Input
10 4 | -
10 is the number of interval
4 is the width of an interval
/ is the major mark
* is the minor mark
Sample Output
|----|----|----|----|----|----|----|----|----|----|
I want to add another loop that when you type 'n' as a major mark
the output would be:
Sample Input
3 2 n x
Sample Output
0xx1xx2xx3
'n' value are numbers from 0, 1, 2, 3... and so on.