if(a< (b+c)||(b< (a+c)))
System.out.println("The triangle is possible.");
else
System.out.println("The triangle is not possible");
if(b< (a+c)||(c<(a+b)))
System.out.println("The triangle is possible.");
else
System.out.println("The triangle is not possible.");
if (c< (a+b)||(a<b+c))
System.out.println("The triangle is possible.");
else
System.out.println("The triangle is not possible.");
package com.codegym.task.task04.task0415;
/*
Rule of the triangle
*/
import java.io.*;
import java.util.Scanner;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if(a< (b+c)||(b< (a+c)))
System.out.println("The triangle is possible.");
else
System.out.println("The triangle is not possible");
if(b< (a+c)||(c<(a+b)))
System.out.println("The triangle is possible.");
else
System.out.println("The triangle is not possible.");
if (c< (a+b)||(a<b+c))
System.out.println("The triangle is possible.");
else
System.out.println("The triangle is not possible.");
}
}