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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started