Java input three sides of the triangle, judge whether it is a triangle, triangle shape Java language to achieve this topic: input three sides of the triangle to determine whether equilateral triangle, isosceles triangle, unequal triangle;

Java input three sides of the triangle, judge whether it is a triangle, triangle shape Java language to achieve this topic: input three sides of the triangle to determine whether equilateral triangle, isosceles triangle, unequal triangle;


Function third(a,b,c){if(a>0 && b>0 && c>0){
If (a = = B & & B = = C) return ("equilateral triangle"); else
If (a = = B | B = = C | a = = C) return ("isosceles triangle"); else
If (a + b > C & & A + C > b & & B + C > A) return ("unequal triangle");
}



Java known triangle on both sides of a, B and the angle c on both sides, find the triangle area
Using java to solve the known triangle on both sides of a, B and the angle c on both sides, find the triangle area
Full code required


S=1/2absinC



Using java to write a program, require the input radius of the circle, the circumference of the circle, area
PS: I am a beginner!


The method above should be correct, but I don't think it shows the object-oriented features of Java. The following is what I wrote, which should be very clear
import java.io.BufferedReader ;
import java.io.InputStreamReader ;
public class Circle
{
Int radius; / / define variable radius
Double perimeter() / / perimeter method
{
return radius*2*3.14;
}
Double area() / / area method
{
return radius*radius*3.14;
}
public static void main(String[] agrs)
{
try
{
BufferedReader buf = new BufferedReader(new InputStreamReader( System.in ));
System.out.println (Hello, please enter radius:);
//Get a line of keyboard input, and convert to integer!
Circle circle = new Circle(); //
circle.radius = Integer.parseInt ( buf.readLine ());
System.out.println (perimeter is)+ circle.perimeter ());
System.out.println (area of)+ circle.area ());
}
catch (Exception e)
{
System.out.println (e.toString());
}
}
}