#include #include using namespace std; /* Flag of Ukraine. Download, compile, and run it like this: cd wget https://markmeretzky.com/fordham/1600/src/if/ukraine.C compile ukraine ukraine | /usr/bin/pnmtopng > public_html/ukraine.png Then point your web browser at https://storm.cis.fordham.edu/~jsmith/ukraine.png */ int main() { const int nrows {20}; //number of rows of pixels const 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; }