HW3.19

HW3.19

 import java.util.Scanner;

 public class Solution
 {
     public static void main(String[] args)
     {
         Scanner input = new Scanner(System.in);

         System.out.print("Enter three edges: ");
         double side1 = input.nextDouble();
         double side2 = input.nextDouble();
         double side3 = input.nextDouble();

         input.close();

         System.out.print("Can edges " + side1 + " , " + side2 + " and " + side3 + " from a triangle? ");

         if(side1 + side2 > side3 && side1 + side3 > side2 && side2 + side3 > side1)
             System.out.println("true");
         else
             System.out.println("false");
     }
 }
上一篇:JavaScript中getBoundingClientRect()方法详解


下一篇:[TCP/IP]TCP的三次握手和四次挥手