You will need two for loops to do it. Just draw the filler char everytime except when your loop counter varibles == 0 or the max row/col number.
There may be a better way to do this, but this code gets the job done.
Code:
#include <iostream>
using namespace std;
int main() {
char border = '&';
char filler = '*';
const int ROWS = 5;
const int COLS = 7;
for (int i = 0; i < ROWS; i++) {
if (i == 0 || i == (ROWS - 1)) {
for (int j = 0; j < COLS; j++) {
cout << border;
}
} else {
for (int j = 0; j < COLS; j++) {
if(j == 0 || j == (COLS - 1))
cout << border;
else
cout << filler;
}
}
cout << "\n";
}
}