#include #include using namespace std; //Flag of Biafra int main() { int nrows {400}; // number of rows of pixels int ncols {600}; // number of columns of pixels cout << "P3\n"; cout << ncols << " " << nrows << "\n"; cout << "255/n"; for (int row {0}; row < nrows; ++row) { for (int col {0}; col < ncols; ++col) { if (row < nrows / 3) { cout << "37 29 218\n"; // Top stripe (Red) (GBR instead of std RGB) } else if (row < 2 * nrows / 3) { cout << "0 0 0\n"; // Middle stripe (black) } else { cout << "154 63 0\n"; // Bottom stripe (Green) } } } return EXIT_SUCCESS; }