I am trying to get this multiplication table to display one line at a time and the timer syntax's that I have been using just doesn't seem to work. I have used a wait while loop, a pause delay function, and a couple of other attempts of which none have worked correctly. I don't know if I am not using the right thing or if I am not putting them in the right place or what. Could someone help me please?
Code:
void choiceC()
{
system("cls");
// create a 2D array "multi" of integer data type
int multi[12][12];
cout << "\n\t\t\t**MULTIPLICATION TABLE**\n\n";
cout <<" ";
//set up horizontal grid numbering 1 thru 12
for (int x = 0; x < 12; x++)
{
cout.width(5);
cout << x+1;
}
cout << "\n";
cout <<" ";
//set up underscore line for horizontal grid
for (int y = 0; y < 60; y++)
{
cout<< "_";
}
cout << "\n";
//set vertical grid numbering 1 thru 12 and vertical grid line
for (int row = 0; row < 12; row++)
{
cout.width(5);
cout << row +1 << " x ? ="<< "|";
for (int col = 0; col < 12; col++)
{
//displays table of multiplication (i.e. 1x1; 1x2; 1x3;12x12;etc.)
multi[row][col] = (row+1)*(col+1);
cout.width(5);
cout << multi[row][col];
}
cout << "\n";
}
cout << "\n";
// end of choice C program
}