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

TOP

返回列表