回覆列表
  • 1 # 龍之心

    回答:package com;

    import java.util.Scanner;

    public class W

    {

    public static void main(String[] args){

    System.out.println("請輸入三邊以逗號隔開");

    Scanner sc = new Scanner(System.in);

    String location1 = sc.next();

    String[] location1s = location1.split(",");

    int x1 = Integer.parseInt(location1s[0]);

    int y1 = Integer.parseInt(location1s[1]);

    int z1 = Integer.parseInt(location1s[2]);

    if((x1+y1>z1)&&(x1+z1>y1)&&(y1+z1>x1)){

    System.out.println("能構成三角形");

    }else{

    System.out.println("不能構成三角形");

    }

    }

    }

  • 中秋節和大豐收的關聯?
  • 哪種印表機便宜,而且節省耗材,耗材又便宜?