Write a simple java application which calculates the area


Can you find the area of a triangle?

Program: Write a simple Java application which calculates the area of a triangle. Your application should ask the user to enter the base and height values of the triangle.

You must use the Scanner class to collect the user's input. The height and base values should be treated as floating point values. Calculate the area of triangle: area = 0.5 * base * height.

You must use a JOptionPane to output the result.

Your output of the program must show three digits after the decimal point - make sure you remember to import what your program will use.

 

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Write a simple java application which calculates the area
Reference No:- TGS0958400

Expected delivery within 24 Hours