/* value. */
int main()
{
/* Declare and initialize variables. */
int row, col;
double t[NROWS][NCOLS], t2[NROWS][NCOLS], top, right, left, bottom,
tolerance, check, update, max_update=0;
/* Prompt user to enter initial temperatures and tolerance. */
cout << “Enter initial temperatures (top, right, bottom, left): “;
cin >> top >> right >> bottom >> left;
}
for (col=0; col<NCOLS; col++)
{
t[0][col] = top;
t[NROWS-1][col] = bottom;
t2[0][col] = top;
t2[NROWS-1][col] = bottom;
}
/* Update the grid across the rows. */
while((max_update > tolerance) || (max_update < –tolerance))