Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

After step 2 is done step 3 (4pts) says modify the program to only accept an arrowhead width that is larger than the arrow base

After step 2 is done step 3 (4pts) says modify the program to only accept an arrowhead width that is larger than the arrow base width. use loop to continue inputting the arrowhead width until the value is larger than the arrow base width. If input is 4 3 3 2 4. Sample output is *** *** *** *** **** *** ** *

image text in transcribed
Program Specifications Write a program that outputs a downwards facing arrow composed of a rectangle and a right triangle. Arrow dimensions are defined by user specified arrow base height, arrow base width, and arrow head width. Note: this program is designed for incremental development. Complete each step and submit for grading before starting the next step. Only a portion of tests pass after each step but confirm progress. Step 1 (3 pts). Input the arrow base height (int) and width (int). Draw a rectangle using asterisks (height x width). Hint: use a nested loop in which the inner loop draws one row of *s, and the outer loop iterates a number of times equal to the height. Submit for grading to confirm two tests pass. Ex: If input is: 6 4 Sample output is: * * * * * * * * * * * * * * * * * * * * * * * * Step 2 (3 pts). Input the arrow head width and draw a right triangle. Hint: use a nested loop. Submit for grading to confirm four tests pass. Ex: If input is: 4 3 4 Sample output is: * * * * * * * * * * * * * * * * * * * * *

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions

Question

How many bytes a char data type occupies?

Answered: 1 week ago

Question

The intermediate code is referred to as?

Answered: 1 week ago

Question

A loop with in another loop is called a ?

Answered: 1 week ago

Question

Java interpreter is also known as ?

Answered: 1 week ago

Question

Which purpose a construction is used?

Answered: 1 week ago