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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:10
1. declare a constant named cents_per_pound and initialize with 25. 2. get the shipping weight from user input storing the weight into shipweightpounds. 3. using flat_fee_cents and cents_per_pound constants, assign shipcostcents with the cost of shipping a package weighing shipweightpounds.
Answers: 2
question
Computers and Technology, 22.06.2019 17:30
Ou listened to a song on your computer. did you use hardware or software?
Answers: 2
question
Computers and Technology, 23.06.2019 07:30
What key should you press and hold to select and open multiple files at one time? enter alt control esc
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
What can a word user do with the customize ribbon dialog box? check all that apply. minimize the ribbon add a new tab to the ribbon remove a group from a tab add a group to a tab choose which styles appear choose which fonts appear choose tools to appear in a group
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
question
History, 23.01.2021 09:10
question
History, 23.01.2021 09:10
question
Mathematics, 23.01.2021 09:10
question
History, 23.01.2021 09:10
question
Mathematics, 23.01.2021 09:10
question
Mathematics, 23.01.2021 09:10
question
Mathematics, 23.01.2021 09:10
question
Mathematics, 23.01.2021 09:10
Questions on the website: 13722367