Question: In Java, 1. Write a program that generates a random double base (b) and height (h) for a triangle in the range 5 to 10,

In Java,

1. Write a program that generates a random double base (b) and height (h) for a triangle in the range 5 to 10, inclusive, and then computes the area of the triangle and shows it with three decimal points.

2. Ask the user to input a base and height for a second triangle in range of 10 to 20 and then print the ratio of the area of the first triangle to this new triangle in percentage with currect formatting.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!