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
Get step-by-step solutions from verified subject matter experts
