#include #include using namespace std; //Flag of Ukraine. //Run it like this: ./a.out | /usr/bin/pnmtopng > ukraine.png // ls -l // file ukraine.png // cp ukraine.png public_html int main() { int nrows {20}; //number of rows of pixels int ncols {30}; //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 (row < 10) { cout << "0 87 183\n"; //upper half is blue } else { cout << "255 215 0\n"; //lower half is yellow } } } return EXIT_SUCCESS; }