返回列表 發帖
  1. public class Ch01
  2. {
  3.     static float area(float x,float y)
  4.     {
  5.             return x*y/2;
  6.     }
  7.         public static void main(String[] args)
  8.         {
  9.         System.out.println("底為9,高為3的三角形面積為"+area(9,3)+"平方公分");
  10.         }

  11. }
複製代碼

TOP

返回列表