
Patrick B. answered 04/20/21
Math and computer tutor/teacher
using namespace std;
#include <iostream>
int main()
{
int numRows=-1;
int numColumns=-1;
while (numRows<1 && numColumns<1)
{
cout << "Please input # of rows :>";
cin >> numRows;
cout << "Please input # of columns :>";
cin >> numColumns;
if (numColumns>26)
{
cout << "too many - sorry " << endl;
numColumns=-1;
}
}
char startChar='A';
char stopChar = startChar+numColumns;
for (int iRowLoop=0; iRowLoop<numRows; iRowLoop++)
{
for (char chColumn=startChar; chColumn<=stopChar; chColumn++)
{
cout << chColumn << (iRowLoop+1) << " ";
}
cout << endl;
}
}