返回列表 發帖
public class Ch01 {
        
        static float tri(float x, float y)
        {
                return x*y/2;
        }
        
        public static void main(String[] args)
        {
                System.out.println("底7公分,高5公分的三角形,面積為"+tri(7,5)+"平方公分。");        
        }
}

TOP

返回列表