#include #include using namespace std; int main() { int nrows {500}; //number of rows of pixels int ncols {700}; //number of columns of pixels cout <<"P3\n" << ncols << " " << nrows << "\n" << 255 << "\n"; for (int row {0}; row < nrows; ++row) { for ( int col {0}; col < ncols; ++col){ if (col < ncols/4) { cout << "255 239 213\n"; // 1st fourth is papayawhip } else if (col < ncols/2) { cout << "225 218 185\n"; // 2nd fourth is peachpuff } else if (col < ncols *3/4) { cout << "255 192 203\n"; // 3rd fourth is pink } else { cout << "240 128 128\n"; // 4th fourth is lightcoral } } } return EXIT_SUCCESS; }