Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I want to create the flags for Poland, the Netherlands, and Italy using ppm files and file redirection. I can't seem to get my pixels

image text in transcribed

image text in transcribed

I want to create the flags for Poland, the Netherlands, and Italy using ppm files and file redirection. I can't seem to get my pixels lined up correctly to make my flags. Here's my output for when I tried to make my flag for Poland. Any way to fix this?

I am working in C

#include #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 (void) int width, country_ code; int i; fprintf(stderr, "Enter what country's fscanf(stdin, "%d", &country-code); flag you would like to display. Code Numbers :t Poland 1ntt . Netherlands-21ntt Italy-31nlnEnter Code Number:") fprintf(stderr, "What width (in pixels) do you want it to be?") fscanf(stdin, "%d", &width); fprintf(stderr, " Making country %d's flag with width %d pixels ", country-code, width); if ((country_code 1)) void make-ppm-image (int country-code, nt width); fprintf (stdout, "P61nosd 400 255In",width) for i0; i

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems 6th Asian Conference Aciids 2014 Bangkok Thailand April 7 9 2014 Proceedings Part I 9 2014 Proceedings Part 1 Lnai 8397

Authors: Ngoc-Thanh Nguyen ,Boonwat Attachoo ,Bogdan Trawinski ,Kulwadee Somboonviwat

2014th Edition

3319054759, 978-3319054759

More Books

Students also viewed these Databases questions

Question

What must a creditor do to become a secured party?

Answered: 1 week ago

Question

When should the last word in a title be capitalized?

Answered: 1 week ago

Question

1. In what ways has flexible working revolutionised employment?

Answered: 1 week ago