#include #include using namespace std; /* Flag of France. Download, compile, and run it like this: cd wget https://markmeretzky.com/fordham/1600/src/if/france.C compile france france | /usr/bin/pnmtopng > public_html/france.png Then point your web browser at https://storm.cis.fordham.edu/~jsmith/france.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 (col < 10) { cout << "255 0 0\n"; //left third is red } else if (col < 20) { cout << "255 215 0\n"; //middle third is yellow } else { cout << "0 128 0\n"; //right third is green } } } return EXIT_SUCCESS; }