-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path2313.java
45 lines (37 loc) · 918 Bytes
/
2313.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import java.io.IOException;
import java.util.Locale;
import java.util.Scanner;
/*
*
*/
public class Main {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
Locale.setDefault(Locale.US);
int A=0,B=0,C=0;
A = sc.nextInt();
B = sc.nextInt();
C = sc.nextInt();
if(Math.abs(B-C)<A && A<B+C) {
if(A!=B && B!=C && A!=C) {
System.out.println("Valido-Escaleno");
}
if(A==B && B!=C || B==C && B!=A || C==A && C!=B) {
System.out.println("Valido-Isoceles");
}
if(A==B && B==C) {
System.out.println("Valido-Equilatero");
}
if(A*A==B*B+C*C || B*B==A*A+C*C || C*C==A*A+B*B) {
System.out.println("Retangulo: S");
}
if(A*A!=B*B+C*C && B*B!=A*A+C*C && C*C!=A*A+B*B) {
System.out.println("Retangulo: N");
}
}
if(Math.abs(B-C)>A && A>=B+C) {
System.out.println("Invalido");
}
sc.close();
}
}