hm.. I can't figure out, what is wrong here?
I can't fulfil this condition: If a triangle with the specified sides could exist, you need to display: "The triangle is possible."
any hints ?
package com.codegym.task.task04.task0415;
/*
Rule of the triangle
*/
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 * c < a) {
System.out.println("The triangle is possible.");
}
if (b * c < a && c * a < b) {
System.out.println("The triangle is possible.");
}
if (a * b < c && c * a < b) {
System.out.println("The triangle is possible.");
}
else {
System.out.println("The triangle is not possible.");
}
}
}