#include #include using namespace std; //Flag of France. //Run it like this: ./a.out | /usr/bin/pnmtopng > france.png // file france.png // cp france.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 (col < 10) { cout << "0 85 164\n"; //left third is blue } else if (col < 20) { cout << "255 255 255\n"; //middle third is white } else { cout << "239 65 53\n"; //right third is red } } } return EXIT_SUCCESS; }