My code is below. it is giving me the correct answer and complies without error, but the system is saying the last condition is not met. Help!
package com.codegym.task.task04.task0415;
/*
Rule of the triangle
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader (new InputStreamReader (System.in));
String num1 = br.readLine();
String num2 = br.readLine();
String num3 = br.readLine();
int a = Integer.parseInt(num1);
int b = Integer.parseInt(num2);
int c = Integer.parseInt(num3);
int math1 = a+b;
int math2 = a+c;
int math3 = b+c;
if (math1>c)
System.out.println("The triangle is possible.");
else if (math2>b)
System.out.println("The triangle is possible.");
else if (math3>a)
System.out.println("The triangle is possible.");
else if (math1<c && math2
package com.codegym.task.task04.task0415;
/*
Rule of the triangle
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader (new InputStreamReader (System.in));
String num1 = br.readLine();
String num2 = br.readLine();
String num3 = br.readLine();
int a = Integer.parseInt(num1);
int b = Integer.parseInt(num2);
int c = Integer.parseInt(num3);
int math1 = a+b;
int math2 = a+c;
int math3 = b+c;
if (math1>c)
System.out.println("The triangle is possible.");
else if (math2>b)
System.out.println("The triangle is possible.");
else if (math3>a)
System.out.println("The triangle is possible.");
else if (math1<c && math2<b && math3<a)
System.out.println("The triangle is not possible.");//write your code here
}
}