Question: Regular C Programming please. I can't understand Make a Program that is able to create an image of flags Germany, France, and Botswana. country_code should
Regular C Programming please. I can't understand
Make a Program that is able to create an image of flags Germany, France, and Botswana. country_code should be 1, 2, and 3 for Germany, France, and Botswana
1. Use fprintf(stderr, ...) to prompt the user for input.
2. Use an if-else, or switch statement based on the country_code and put the code to create the flags within each part of the if-else or switch, whichever you have chosen.
3. Use nested for loops to iterate through the image, and generate an image of the correct size as determined by the users input to width.
4. Determine what row and column the program is currently iterating through, and write the correct color based on where on the flag that is.
so my variables are like this
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);
it should run like this

also measurements are in pixels
a.out flags.c ./a.out > Germany. ppm What country's flag do you want to create? 1 What width (in pixels) do you want it to be? 500 Making country l's flag with width 500 pixels... Done! is a.out flags.c Germany. ppm a.out flags.c ./a.out > Germany. ppm What country's flag do you want to create? 1 What width (in pixels) do you want it to be? 500 Making country l's flag with width 500 pixels... Done! is a.out flags.c Germany. ppm
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
