#include <stdio.h>
#include <string.h>
typedef struct{
   char type[3];
   int width;
   int height;
   int maxColor;
}header;
typedef struct{
   int r;
   int g;
   int b;
}pixel;
int getWidth();
void writeHeader(header h);
void fillFlagArray(pixel p[], int width, int height);
void writePixels(pixel colors[], int width, int height);
