Question

In: Computer Science

I need to know how to build a flag in c++ for Italy

I need to know how to build a flag in c++ for Italy

Solutions

Expert Solution

#include<stdio.h>
#include<graphics.h>
#include<math.h>

int main(){
   int gd,gm;

detectgraph(&gd,&gm); //detectgraph is used to find out the current graphics driver and mode
   initgraph(&gd,&gm,"C:\\TURBOC3\\BGI"); //initgraph function is used to initialize with the //graphics library and changes to //the graphics screen for drawing.


   //draw the leftmost rectangle and color it
   setcolor(GREEN);
   rectangle(100,150,150,250); //rectangle(int left, int top, int right, int bottom);
   // left specifies the X-coordinate of top left corner, top specifies the Y-coordinate of top left //corner, right specifies the

//X-coordinate of right bottom corner, bottom specifies the
   //Y-coordinate of right bottom corner.
   setfillstyle(SOLID_FILL,GREEN); //setfillstyle() function which sets the current fill pattern and //fill color
   floodfill(101,151,GREEN); //floodfill() function is used to fill an enclosed area.

   //draw the middle rectangle and color it
   setcolor(WHITE);
   rectangle(150,150,200,250);
   setfillstyle(SOLID_FILL,WHITE);
   floodfill(151,151,WHITE);


   //draw the righmost rectangle and color it
   setcolor(RED);
   rectangle(200,150,250,250);
   setfillstyle(SOLID_FILL,RED);
   floodfill(201,151,RED);

   getch();
   closegraph();
   return 0;
}


Related Solutions

I need to create a monthly loan Calculator in C++. I know the formula but can't...
I need to create a monthly loan Calculator in C++. I know the formula but can't figure out what's wrong with my code. Any clarification would be appreciated! // Only add code where indicated by the comments. // Do not modify any other code. #include <iostream> #include <cmath> using namespace std; int main() {    // ---------------- Add code here --------------------    // -- Declare necessary variables here              --        int years = 0; //n     int LoanAmount =...
I need to write a response to how I should I should plan to build financial...
I need to write a response to how I should I should plan to build financial security starting with a job right out of college. I need to include everything seen below. If you can answer in bullet points for each question or a paragraph answering the short parts. Below is the guide Include – Why, What, When, and How a. Financial Goals: Near-term: 1 to 2 yrs; Intermediate-term: 3 – 5 yrs; Long-term: 6 – 15 yrs b. Savings...
how can i find the number of linear discriminant functions? I need to know how i...
how can i find the number of linear discriminant functions? I need to know how i can find out if there is one function, two functions, more? how do i know how many LDF's are there?
I need to write a resume and I do not know how to write it. Please...
I need to write a resume and I do not know how to write it. Please help me. My name is John Doe. I finished Associate of Science in (Electrical Engineering, Computer Engineering, Physics and Math) from Community College. I have work experience over 10 years at food company. Please help me write as completely as possible. Thanks a lot for your help!
I need to know how to make an ethical decision in detail?
I need to know how to make an ethical decision in detail?
I need to know the steps of solution for part (b,c,d) I have been trying for...
I need to know the steps of solution for part (b,c,d) I have been trying for almost 2 days. A 195 -keV X-ray photon coherently scatters off one of the valence electrons of a nitrogen atom. Assume that the scattering angle of the photon is ? = 15
I have a M&A case presentation and I need to know how to answer these questions...
I have a M&A case presentation and I need to know how to answer these questions (I’ve done all the calculations already but really new to the subject and don’t know how to transform the numbers into verbal economic analysis): - What is the value of operational and financial synergies of the merger? Are they meaningful? Do you see risks in attaining them? Highlight the main pros and cons for the whole deal for company A shareholders. - What is...
C++ application that calculates the sales at the end of the day. Need to know how...
C++ application that calculates the sales at the end of the day. Need to know how much money I made on selling my famous banana muffins each day. At the end of each day I must not only enter the number of banana muffins I sold but I must also enter the price of the banana muffins. Each day I have to experiment with changing the price in an attempt to maximize my revenues for his muffins. I also want...
COMPUTER CALCULATIONS: I need to know how to code in R for the solutions, not by...
COMPUTER CALCULATIONS: I need to know how to code in R for the solutions, not by hand. 2. Look at the data in Table 7.18 on page 368 of the textbook. These data are also given in the SAS code labeled “SAS_basketball_goal_data” and R code labeled basketball goal data . The dependent variable is goals and the independent variable is height of basketball players. Complete a SAS /R program and answer the following questions about the data set: (a) Does...
I need to know how to solve this on paper and on a ti-84 A new...
I need to know how to solve this on paper and on a ti-84 A new otc medicine to treat a sore throat is to be tested for its effectiveness. The maker of the drugmedicine take 2 random samples of 25 individuals showing symptoms of a sore throat. Group 1 receives the new medicine and group 2 recieves a placebo. After a few days of the medicine, each group is interviewed and asked how they would rate their comfort level...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT