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);
}
}
I’m not sure but if I wouod have to answer it would be 2 or 3
Answer:
formatted
Explanation:
In order for storage devices to be prepared for use, they must be formatted.
Answer:
5
Explanation:
The operator 'x++' is called the post increment operator, it is assign first and then increment.
The operator '++x' is called the pre increment operator, it is increment first and then increment.
So, both are increment operator which increment the value by one.
initially the value of x is zero,
++x increase the value to 1 and than assign to x.
then, x++ it assign to x first then increment by 1 means x=2
and so on.....
Their are five increment operator are used. so, the result is 5.
Answer:
Explanation:
print('Enter 10 temperatures')
sum = 0
for i in range(10):
S = float(input())
sum = sum + S
print('The sum is: ',sum)
First, we print a comment asking the ten temperatures, then we declare the variable sum = 0.
We create a for cycle where the user must enter the temperatures, 10 in this case, then we must do the operation, summing the 10 numbers.
In the last step, we print the result with the variable sum.