Question: Write a program called flags.c that is capable of creating an image of the flags of Poland, Netherland, and Italy. country_code should be 1, 2,

Write a program called flags.c that is capable of creating an image of the flags of Poland, Netherland, and Italy. country_code should be 1, 2, and 3 for Poland, the Netherlands, and Italy, respectively.

Here's my code so far

#include

void make_pixel(int r,int g, int b);

void make_ppm_header(int width,int height);

void make_ppm_image(int country_code, int width);

int main(){

int width=0;

int country_code=0;

fprintf(stderr, "Enter the country_code of the chosen flag.(1 for Poland, 2 for Netherlands, 3 for Italy)");

fscanf(stdin, "%d", &country_code);

fprintf(stderr, "What width(in pixels) do you it be?");

fscanf(stdin, "%d", &width);

fprintf(stderr, " Making country %d's flag with width %d pixels... ",country_code,width);

return(0);

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!