#include #include using namespace std; /* The variable "row" starts at 0 because it is the number of spaces on each line. The variable "col" starts at 0, to agree with "row". */ int main() { const int nrows {80}; const int ncols {80}; cout << "P3\n" << ncols << " " << nrows << "\n" << 255 << "\n"; for (int row {0}; row < nrows; ++row) { for (int col {0}; col < ncols; ++col) { if (col >= row) { cout << "84 206 149\n"; //teal is on the top diagonal } else { cout << "239 74 179\n"; //pink, the bottom diagonal } } } cout << "\n"; return EXIT_SUCCESS; }