package sx;
import java.util.Scanner;
public class sjx {
public static void main(String[] args) {
// TODO 自动生成的方法存根
int a,b,c;
Scanner in=new Scanner(System.in);
System.out.println("请输入a:");
a=in.nextInt();
System.out.println("请输入b:");
b=in.nextInt();
System.out.println("请输入c:");
c=in.nextInt();
if((a+b)>c&&(a+c)>b&&b+c>a)
{
System.out.println(a+","+b+","+c+"能构成三角形");
}
else
{
System.out.println(a+","+b+","+c+"不能能构成三角形");
}
}
}
运行结果: