返回列表 發帖
  1. public class Ch02 {

  2.         static float tri(float a,float b)
  3.         {
  4.                 return a*b/2;
  5.         }
  6.         public static void main(String[] args) {
  7.             System.out.println("底7公分,高5公分的三角形,面積為:"+tri(7,5)+"平方公分。");
  8.         }
  9. }
複製代碼

TOP

返回列表