close

import java.util.*;

public class triangle
{
  public static void main (String[] args)
  {
    Scanner sc = new Scanner(System.in);
   
    System.out.printf("清輸入三角形邊長A: ");
    int eage_a = sc.nextInt();
    System.out.printf("清輸入三角形邊長B: ");
    int eage_b = sc.nextInt();
    System.out.printf("清輸入AB夾角: ");
    int angle = sc.nextInt();
    double shaped;
    shaped = ( ( eage_a * eage_b * Math.sin(angle) ) / 2 );
    System.out.printf("此三角形面積為: %g", shaped);
  }
}

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 Icen Zhong 的頭像
    Icen Zhong

    無止盡的Coding地獄

    Icen Zhong 發表在 痞客邦 留言(0) 人氣()