Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

how would you write this program using parameters and loops ? How wide do you wa

ID: 3547311 • Letter: H

Question

how would you write this program using parameters and loops ?





How wide do you want your floor to be? 9

How long do you want your floor to be? 5


-------------------------------------

| | | | | | | | | |

| | | | | | | | | |

-------------------------------------

| | | | | | | | | |

| | | | | | | | | |

-------------------------------------

| | | | | | | | | |

| | | | | | | | | |

-------------------------------------

| | | | | | | | | |

| | | | | | | | | |

-------------------------------------

| | | | | | | | | |

| | | | | | | | | |

-------------------------------------

Explanation / Answer

Step 1 : take the input , and store them in variable say width and height

Step 2 : run two loops

for(i =0 ; i < height ; i++)

for(j = 0 ; j <width ; j++)

Step 3 : write the code corresponding each segment

Step 4: Print the answer