返回列表 發帖
  1. public class Ch000
  2. {
  3.     static float tri(float a,float b)
  4.     {
  5.             return a*b/2;                
  6.     }   
  7.         public static void main(String args[])
  8.     {                  
  9.            System.out.println("底300公分,高123公分的三角形,其面積為"+tri(300,123)+"公分");
  10.     }
  11. }
複製代碼

TOP

返回列表