Question: in the external function, 1) Find the maximum edge length from the 3 edge lengths passed from function main(). 2) Calculate the half value of
in the external function,
1) Find the maximum edge length from the 3 edge lengths passed from function main().
2) Calculate the half value of the maximum edge length, and scale the half value within the range of 1 ~ 10 (both inclusive), and the scaled number will be used as the row number. For example, the maximum edge length in the example is 100 cm (50cm, 100cm, 75cm), and its half value is 50 cm, then it is scaled to 5, and 5 will be the row number.
3) The height of the triangle should also be scaled within the range of 1 ~ 10 (both inclusive) and this value will be used as the column number. For example, the height of the example triangle is 36.31cm, then it is scaled to 3.63 cm, and 3 will be the column number.
4) Use the row number from step 8.2 and the column number from step 8.3 to draw a triangle pattern use the symble *. The number of * to be printed on each row follows Equation 3. Note: only the integer part of the result calculated by Equation 3 is kept for pattern printing.
^ = () /

mber of on ith row =( int )RowNumberColumnNumberi Equation 3 Figure 2 The printed patter is half of the yellow triangle in this figure
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
