返回列表 發帖
  1. public class Ch06
  2. {
  3.         static float tri(float x, float y)
  4.         {
  5.                 return x*y/2;
  6.         }
  7.        
  8.         public static void main(String[] args)
  9.         {
  10.                 System.out.println("A triange with bottom 7cm, Height 5cm's area is "+tri(7,5)+" cm square.");
  11.         }
  12. }
複製代碼

TOP

返回列表