返回列表 發帖
  1. public class ch03
  2. {
  3.         
  4.         static float tri(float x, float y)
  5.         {
  6.                 return x*y/2;
  7.         }
  8.         
  9.         public static void main(String[] args)
  10.         {
  11.                 System.out.println("底7公分,高5公分的三角形,面積為"+tri(7,5)+"平方公分。");        
  12.         }
  13. }  
複製代碼
我好帥
我超級帥
我非常的帥
我宇宙第一帥

TOP

返回列表