subject

This program outputs a downwards facing arrow composed of a rectangle and a right triangle. The arrow dimensions are defined by user specified arrow base height, arrow base width, and arrow head width. #include

int main(void) {
int arrowBaseHeight = 0;
int arrowBaseWidth = 0;
int arrowHeadWidth = 0;

printf("Enter arrow base height:\n");
scanf("%d", &arrowBaseHeight);

printf("Enter arrow base width:\n");
scanf("%d", &arrowBaseWidth);

printf("Enter arrow head width:\n");
scanf("%d", &arrowHeadWidth);
printf("\n");

// Draw arrow base (height = 3, width = 2)
printf( "**\n");
printf( "**\n");
printf( "**\n");

// Draw arrow head (width = 4)
printf( "\n");
printf( "***\n");
printf( "**\n");
printf( "*\n");

return 0;
}

a. Modify the given program to use a loop to output an arrow base of height arrow_base_height.
b. Modify the given program to use a loop to output an arrow base of width arrow_base_width.
c. Modify the given program to use a loop to output an arrow head of width arrow_head_width.

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 01:50, bessieyounger1211
Click on this link toopens a new window. bring up a flowchart in a new browser window. based on this flowchart, would a d-link 3347 gateway with an xbox 360 multiplayer problem be in scope or out of scope
Answers: 2
image
Computers and Technology, 23.06.2019 02:30, noah2o2o
These factors limit the ability to attach files to e-mail messages. location of sender recipient's ability to open file size of file type of operating system used
Answers: 2
image
Computers and Technology, 23.06.2019 07:30, devnnn44
What is the original authority for copyright laws
Answers: 1
image
Computers and Technology, 23.06.2019 17:00, Need1ng
The more powerful, 60 volt cables and the main power shut-off on an hev are both colored orange.
Answers: 1
You know the right answer?
This program outputs a downwards facing arrow composed of a rectangle and a right triangle. The arro...

Questions in other subjects:

Konu
History, 08.06.2021 19:10
Konu
Mathematics, 08.06.2021 19:10