package com.javarush.task.task04.task0415;
/*
Правило треугольника
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String s1 = reader.readLine();
String s2 = reader.readLine();
String s3 = reader.readLine();
int a = Integer.parseInt(s1);
int b = Integer.parseInt(s2);
int c = Integer.parseInt(s2);
if ((a+b)>c && (a+c)>b && (b+c)>a){
System.out.println("Треугольник существует.");}
else
if (a==b && a==c && b==c){
System.out.println("Треугольник существует.");}
else
if ((a + b) <= c || (a + c) <= b || (c + b) <= a){
System.out.println("Треугольник не существует.");}
}
}
package com.javarush.task.task04.task0415;
/*
Правило треугольника
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String s1 = reader.readLine();
String s2 = reader.readLine();
String s3 = reader.readLine();
int a = Integer.parseInt(s1);
int b = Integer.parseInt(s2);
int c = Integer.parseInt(s2);
if ((a+b)>c && (a+c)>b && (b+c)>a){
System.out.println("Треугольник существует.");}
else
if (a==b && a==c && b==c){
System.out.println("Треугольник существует.");}
else
if ((a + b) <= c || (a + c) <= b || (c + b) <= a){
System.out.println("Треугольник не существует.");}
}
}