返回列表 發帖
  1. public class Ch222 {
  2.         static float trit(float x, float y)
  3.         {
  4.                 return x*y/2;
  5.         }
  6.        

  7.         public static void main(String[] args) {
  8.        
  9.         System.out.println("底7公分,高5公分的三角形,面積為"+trit(7,5)+"平方公分。");

  10.         }

  11. }
複製代碼

TOP

返回列表