Answer to Question #161486 in C++ for Suraj

Question #161486

Fill in the blanks in the following code. The code is written to draw 4 rectangles of heights 20, 30, 40, 50 respectively and widths 20, 15, 10, 5 respectively. The centres of these rectangles are at (1,2)


initCanvas();

double x=20;

double y=20;

repeat(4){

Rectangle r( BLANK-P , BLANK-Q , x, y);

r.imprint();

x = x + BLANK-R ;

y = y + BLANK-S ;

}


1
Expert's answer
2021-02-05T03:24:22-0500
initCanvas();
double x=20;
double y=20;
repeat(4)
{
    Rectangle r((1+P)-P, (2+Q)-Q , x, y);
    r.imprint();
    x = x + (10+R)-R;
    y = y + (-5+S)-S;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog