Question: example: Enter the number of rows (max 99 ): 10 Enter the number of cols (max 99 ): 20 Enter an interior character: | Enter
example:
Enter the number of rows (max 99): 10 Enter the number of cols (max 99): 20 Enter an interior character: | Enter an exterior character: + + + + + + + + + + + + + + + + + + + + + + | | | | | | | | | | | | | | | | | | + + | | | | | | | | | | | | | | | | | | + + | | | | | | | | | | | | | | | | | | + + | | | | | | | | | | | | | | | | | | + + | | | | | | | | | | | | | | | | | | + + | | | | | | | | | | | | | | | | | | + + | | | | | | | | | | | | | | | | | | + + | | | | | | | | | | | | | | | | | | + + + + + + + + + + + + + + + + + + + + +
This is what I have so far:
#include
#include
using namespace std;
int main() {
int rows;
int cols;
char c1;
char c2;
cout<<"Enter the number of rows (max 99): ";
cin>>rows;
cout< cout<<"Enter the number of cols (max 99): "; cin>>cols; cout< cout<<"Enter an interior character: "; cin>>c1; cout< cout<<"Enter an exterior character: "; cin>>c2; cout< int i = 1; while (i <= rows) { int j = 1; while (j <= cols) { if (i == 1 || i == rows || j == 1 || j == cols) cout< else { cout << c1 << " "; j++; } cout<< " " << endl; i++; } } cout<<"Here are the names: " << endl; for(i = 0, i <5, i++) { cout< } } return 0; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
