I'm having trouble trying to create the italian, polish, and netherlands flag in C Here's my code...

90.2K

Verified Solution

Question

Programming

I'm having trouble trying to create the italian, polish, andnetherlands flag in C

Here's my code so far:

#include

int main(){

   int country_choice;

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

   fscanf(stdin, \"%d\", &country_choice);

  

switch (country_choice) {

case 1:

printf(\"Poland Flag\n\");

printf(\"%c%c%c\", 255,255,255);

printf(\"%c%c%c\", 220,20,60);

  

break;

  

  

case 2:

printf(\"Italian Flag\n\");

printf(\"%c%c%c\", 0,146,70);

printf(\"%c%c%c\", 225,255,255);

printf(\"%c%c%c\", 206,43,55);

break;

  

case 3:

printf(\"Netherlands Flag\n\");

printf(\"%c%c%c\", 174,28,40);

printf(\"%c%c%c\", 225,255,255);

printf(\"%c%c%c\", 33,70,139);

break;

  

default:

printf(\"Wrong Option\");

break;

}

   return(0);

}

Answer & Explanation Solved by verified expert
4.5 Ratings (882 Votes)
include int main int countrychoiceheightwidthi declaring width and height of the flag fprintfstderr Enter the countrycode of the chosen flag1 for Poland 2 for    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students