import java.util.Scanner;
public class BodySurfaceArea {
// เขียนโปรแกรมคำนวณพื้นที่ผิวของร่างกาย จากความสูงและน้ำหนัก
// ตามสูตรของ Mosteller, Du Bois, และ Boyd
// ตัวอย่างผลการทำงานของโปรแกรม
// ความสูง (เซนติเมตร) = 173
// น้ำหนัก (กิโลกรัม) = 64
// Mosteller (ตารางเมตร) = 1.7537261917287874
// Du Bois (ตารางเมตร) = 1.764315450580209
// Boyd (ตารางเมตร) = 1.7560902117612218
// หมายเหตุ
// ใช้รูปแบบการแสดงผลดังตัวอย่างข้างบนนี้ อย่าพิมห์ขาดหรือเกินจากที่กำหนด
public static void main(String[] args) {
Scanner kb = new Scanner(System.in);
System.out.print("ความสูง (เซนติเมตร) = ");
double h = kb.nextDouble();
System.out.print("น้ำหนัก (กิโลกรัม) = ");
double w = kb.nextDouble();
double mosteller;
double dubois;
double boyd;
mosteller = Math.sqrt(w * h / 3600);
dubois = 71.84 * Math.pow(w, 0.425) * Math.pow(h, 0.725) / Math.pow(10, 4);
boyd = 3.207 * Math.pow(10, -4) * Math.pow(h, 0.3) * Math.pow(1000 * w, 0.7285 - (0.0188 * (3 + Math.log10(w))));
System.out.println("Mosteller (ตารางเมตร) = " + mosteller);
System.out.println("Du Bois (ตารางเมตร) = " + dubois);
System.out.println("Boyd (ตารางเมตร) = " + boyd);
}
}
|
SM=0, CM=10, ST=16, KY=205, TR=60:00
ERR = 60:00 ;
ERR = 60:00 ;
ERR = 60:00 ;
ERR = 60:00 ;
ERR = 60:00 ;
ERR = 60:00 ;
ERR = 60:00 ;
ERR = 60:00 ;
ERR = 60:00 ;
ERR = 60:00 ;
|