1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Maurinko [17]
4 years ago
11

Write an application that reads the lengths of the sides of a triangle from the user. compute the area of the triangle using her

on's formula (below), in which s represents half of the perimeter of the triangle and a, b, and c represent the lengths of the three sides. print the area rounded to three decimal places.
Computers and Technology
1 answer:
zlopas [31]4 years ago
3 0

Here you go,


import java.util.Scanner;

import java.util.Random;

public class OrderCalculator{


public static void main(String[] args){  


float x, y, z, semi, area;

Scanner in = new Scanner(System.in);

System.out.print("Enter the 3 sides: ");

x = in.nextFloat();

y = in.nextFloat();

z = in.nextFloat();

semi = (float) ((x + y + z) / 2.0);

area = (float) Math.sqrt(semi * (semi - x) * (semi - y) * (semi - z));

System.out.printf("The area is: %.3f\n", area);


}

}

You might be interested in
Write a function to sum the following series:
Phoenix [80]

Answer:

<u>C program to find the sum of the series( 1/2 + 2/3 + ... + i/i+1)</u>

#include <stdio.h>

double m(int i);//function declaration  

//driver function

int main() {

int i;

printf("Enter number of item in the series-\n");//Taking input from user

scanf("%d",&i);

double a= m(i);//Calling function

printf("sum=%lf",a);

return 0;

}

double m(int i)//Defining function

{

double j,k;

double sum=0;

for(j=1;j<i+1;j++)//Loop for the sum

{

k=j+1;

sum=sum+(j/k);

}

return sum;

}

<u>Output:</u>

Enter number of item in the series-5

sum=3.550000

5 0
3 years ago
Which of the following is probably not a place where it is legal to download the music of a popular artist whose CDs are sold in
nignag [31]

Answer:

A. Personal blogs

Explanation:

I did the quick check, and there you go...it's A.

5 0
3 years ago
When you receive a rejection message from an employer, you should?
Sergio039 [100]
Move on and continue your job search!
3 0
3 years ago
Choose the word that best completes this sentence. You should post safe load _________ for each floor and keep aisles and passag
erica [24]
You should post safe load limits for
3 0
3 years ago
Read 2 more answers
Sue follows these steps to create a chart in her presentation. Step 1: Navigate to the Insert tab. Step 2: Click the Chart butto
kotegsom [21]

Answer:

a table with sample values

a chart with sample values

Explanation:

Microsoft powerpoint is a powerful presentation tool. It has several tools and can be used to present even excel files, charts and other graphical data.

When a chart is created in powerpoint, the slide of the application shows a table and a chart with sample values.

7 0
3 years ago
Read 2 more answers
Other questions:
  • Race conditions are possible in many computer systems. Consider a banking system with two methods: deposit(amount) and withdraw(
    14·1 answer
  • What is that black thing on my wall?
    9·1 answer
  • What command do you type in the search box to access the command line intrface in windows?
    8·1 answer
  • List three things that sally sue can improve
    12·2 answers
  • A program that accepts insurance policy data, including a policy number, customer last name, customer first name, age, premium d
    12·1 answer
  • What two things can you do to display the entire content of a cell? ​
    5·1 answer
  • The software maintains and manages information related to employees, rooms, committees, and committee meetings of a company. The
    9·1 answer
  • Failing to include a complete ____ on each side of an &amp;&amp; operator in an if statement is a common error in Java programmi
    6·2 answers
  • Roses are red, violets are blue, I'm going to ki.ll myself, to make life better for you.
    10·2 answers
  • 9) Which date is assigned the serial number of 1?
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!