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. (1) Modify the given program to use a loop to output an arrow base of height arrowBaseHeight. (1 pt)

(2) Modify the given program to use a loop to output an arrow base of width arrowBaseWidth. Use a nested loop in which the inner loop draws the *’s, and the outer loop iterates a number of times equal to the height of the arrow base. (1 pt)

(3) Modify the given program to use a loop to output an arrow head of width arrowHeadWidth. Use a nested loop in which the inner loop draws the *’s, and the outer loop iterates a number of times equal to the height of the arrow head. (2 pts)

(4) Modify the given program to only accept an arrow head width that is larger than the arrow base width. Use a loop to continue prompting the user for an arrow head width until the value is larger than the arrow base width. (1 pt)
while (arrowHeadWidth
using namespace std;

int main() {
int arrowBaseHeight;
int arrowBaseWidth;
int arrowHeadWidth;

cout > arrowBaseHeight;

cout > arrowBaseWidth;

cout > arrowHeadWidth;
cout << endl;

// Draw arrow base (height = 3, width = 2)
cout << "**" << endl;
cout << "**" << endl;
cout << "**" << endl;

// Draw arrow head (width = 4)
cout << "" << endl;
cout << "***" << endl;
cout << "**" << endl;
cout << "*" << endl;

return 0;
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 15:30
The processing of data in a computer involves the interplay between its various hardware components.
Answers: 1
question
Computers and Technology, 24.06.2019 01:10
Create a program that will take in a single x and y coordinate as the origin. after the input is provided, the output should be all of the coordinates (all 26 coordinates read from the “coordinates.json” file), in order of closest-to-farthest from the origin.
Answers: 1
question
Computers and Technology, 25.06.2019 21:00
An in active student wants to become more physically active but does not want the money to pay for gym membership what is the most effective think she can do to develop realistic fitness routine
Answers: 2
question
Computers and Technology, 25.06.2019 22:00
Technician a says that air-conditioning service machines are used exclusively with hfc-134a systems. technician b says that refrigerant containing sealers should be recycled. who is correct?
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
Questions on the website: 13722365