herrDeng網內搜尋

自訂搜尋

Ads

2013年3月26日 星期二

BMI 之判斷


BMI (Body Mass Index)= 體重 (kg) / 身高 ^2(m2)
在台灣,行政院衛生署乃根據其相關研究,於2002年4月公佈台灣成人肥胖標準:
  • BMI<18.5 為過輕,
  • 18.5≦BMI<24 為正常體重,
  • 24≦BMI<27 為過重,
  • BMI≧27 即為肥胖。

69 則留言:

b9833154徐瑋侖 提到...


public class bmi {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub

double m = 1.77 , w = 87 ;
float bmi ;
bmi = (float) (w/(m*m)) ;
System.out.println(bmi);

if (bmi < 18.5)
System.out.println("過輕");
else if (bmi <24)
System.out.println("正常");
else if (bmi < 27)
System.out.println("過重");
else
System.out.println("肥胖");
}

}

b9933122苑珮婕 提到...

public class b9933122_01 {

public static void main(String[] args) {
// TODO Auto-generated method stub
float h=163,w=60;
float bmi=w/(h*h)*10000;
if(bmi<18.5){
System.out.println("過輕");
}else if(bmi<24){
System.out.println("正常");
}else if(bmi<27){
System.out.println("過重");
} else{
System.out.println("肥胖");
}
}

}

B9933133張靖 提到...

public class Test_one {

public static void main(String[] args) {

float h = 178, w = 62;
float bmi = w / (h * h) * 10000;
if (bmi < 18.5) {
System.out.println("過輕!");
} else if (bmi < 24) {
System.out.println("正常!");
} else if (bmi < 27) {
System.out.println("過重!");
} else {
System.out.println("肥胖!");
}
}

}

B10133044吳盛盟 提到...

public class fir{
public static void main(String[] args){
float m=162;
float w=51;
float bmi=w/(m*m)*10000;
if(bmi>=27){
System.out.print("肥胖");
}
else if(bmi>=24){
System.out.print("過重");
}
else if(bmi>=18.5){
System.out.print("正常體重");
}
else
System.out.print("過輕");
}
}

B10133027黃為邦 提到...

public class aa {
public static void main(String[] args){
float m=170;
float w=60;
float bmi=w/(m*m)*10000;
if(bmi>=27){
System.out.print("肥胖");
}
else if(bmi>=24){
System.out.print("過重");
}
else if(bmi>=18.5){
System.out.print("正常體重");
}
else {

System.out.print("過輕");
}
}
}

B10133046邱誌寬 提到...

public class sor{
public static void main(String[] args){
float m=178;
float w=62;
float bmi=w/(m*m)*10000;
if(bmi>=27){
System.out.print("肥胖");
}
else if(bmi>=24){
System.out.print("過重");
}
else if(bmi>=18.5){
System.out.print("正常體重");
}
else
System.out.print("過輕");
}
}

B10036036陸語萱 提到...

public class java {


public static void main(String[] args) {
float h=165 , w=50 ;
float bmi=w/(h*h)*10000;
if (bmi<18.5){
System.out.println("過輕");
}
else if (bmi<24){
System.out.println("正常體重");
}
else if (bmi<27){
System.out.println("過重");
}
else {
System.out.println("肥胖");
}


}

}

B10133012呂富凱 提到...

public class aa {
public static void main(String[] args){
float m=168;
float w=54;
float bmi=w/(m*m)*10000;
if(bmi>=27){
System.out.print("肥胖");
}
else if(bmi>=24){
System.out.print("過重");
}
else if(bmi>=18.5){
System.out.print("正常體重");
}
else {

System.out.print("過輕");
}
}
}

B9933179陳俊翰 提到...

public class ifelseBMI {

static public void main (String[] args){

double m=1.65,w=67,BMI;
BMI=w/(m*m);
System.out.println("BMI="+BMI);
if (BMI<18.5)
System.out.println("體重過輕");
else if (BMI<24)
System.out.println("正常體重");
else if (BMI<27)

B10133019王騰侑 提到...

public class aa {
public static void main(String[] args){
float m=200;
float w=55;
float bmi=w/(m*m)*10000;
if(bmi>=27){
System.out.print("肥胖");
}
else if(bmi>=24){
System.out.print("過重");
}
else if(bmi>=18.5){
System.out.print("正常體重");
}
else {

System.out.print("過輕");
}
}
}

B10133015楊超文 提到...

public class aa {
public static void main(String[] args){
float m=177;
float w=58;
float bmi=w/(m*m)*10000;
if(bmi>=27){
System.out.print("肥胖");
}
else if(bmi>=24){
System.out.print("過重");
}
else if(bmi>=18.5){
System.out.print("正常體重");
}
else {

System.out.print("過輕");
}
}
}

B10133017張永憲 提到...

public class ga{
public static void main(String[] args)
{
float m=177;
float w=73;
float bmi=w/(m*m)*10000;
if(bmi>=27){
System.out.print("肥胖");
}
else if(bmi>=24){
System.out.print("過重");
}
else if(bmi>=18.5){
System.out.print("正常體重");
}
else
System.out.print("過輕");
}
}

B10133032黃徐琨 提到...

import java.util.*;
public class aa
{
public static void main(String[] args)
{
Scanner input=new Scanner(System.in);
System.out.println("請輸入身高");
int x =input.nextInt();
System.out.println(x);
System.out.println("請輸入體重");
int y =input.nextInt();
System.out.println(y);
float bmi=(float) y/(x*x)*10000;
System.out.print("你的BMI值為:");
System.out.print(bmi);
if (bmi < 18.5)
System.out.println("\nBMI = " + bmi + " 過輕。\n");
else if (bmi >= 18.5 && bmi < 24)
System.out.println("\nBMI = " + bmi + " 正常體重。\n");
else if (bmi >= 24 && bmi < 27)
System.out.println("\nBMI = " + bmi + " 過重。\n");
else
System.out.println("\nBMI = " + bmi + " 肥胖。\n");
}
}

b10133021吳屹軒 提到...

public class yy{
public static void main(String[] args)
{
float m=164;
float w=76;
float bmi=w/(m*m)*10000;
if(bmi>=27){
System.out.print("肥胖");
}
else if(bmi>=24){
System.out.print("過重");
}
else if(bmi>=18.5){
System.out.print("正常體重");
}
else
System.out.print("過輕");
}
}

B10133014 吳欣怡 提到...

class bmi{
public static void main (String [] args){
float m=158;
float w=50;
float bmi=(float)w/(m*m)*10000;
System.out.println(bmi);
if (bmi<18.5){
System.out.println("過輕");
}
else if (bmi<24){
System.out.println("正常體重");
}
else if (bmi<27){
System.out.println("過重");
}
else {
System.out.println("肥胖");
}
}
}

B10133009 王韋翔 提到...

class test
{
public static void main(String[] args)
{
float m =170;
float w =63;
float bmi = w/(m*m)*10000;

if(bmi<18.5)
{
System.out.print("bmi="+bmi+"為過輕");
}
else if(bmi>=18.5&&bmi<=24)
{
System.out.print("bmi="+bmi+"為正常");
}
else if(bmi>=24&&bmi<27)
{
System.out.print("bmi="+bmi+"為過重");
}
else if(bmi>=27)
{
System.out.print("bmi="+bmi+"為肥胖");
}
}
}

B10133018翁湘姿 提到...

import java.util.*;
class LANG { public static void main (String [] args){
Scanner input=new Scanner(System.in);
float m=162;
float w=77;
float bmi=(float)w/(m*m)*10000;
System.out.println(bmi);

if (bmi < 18.5 )
{System.out.println("過輕");
}

else if ( bmi < 24 ){
System.out.println("正常體重");
}

else if ( bmi < 27 ){
System.out.println("過重");
}

else
System.out.println("肥胖");
}
}

b10133007蔡雅姿 提到...

class test
{
public static void main(String[] args)
{
float m =168;
float w =57;
float bmi = w/(m*m)*10000;

if(bmi<18.5)
{
System.out.print("bmi="+bmi+"為過輕");
}
else if(bmi>=18.5&&bmi<=24)
{
System.out.print("bmi="+bmi+"為正常");
}
else if(bmi>=24&&bmi<27)
{
System.out.print("bmi="+bmi+"為過重");
}
else if(bmi>=27)
{
System.out.print("bmi="+bmi+"為肥胖");
}
}
}

B10133043陳宗霖 提到...

import java.util.*;
public class aa
{
public static void main(String[] args)
{
Scanner input=new Scanner(System.in);
System.out.println("請輸入身高");
int x =input.nextInt();
System.out.println(x);
System.out.println("請輸入體重");
int y =input.nextInt();
System.out.println(y);
float bmi=(float) y/(x*x)*10000;
System.out.print("你的BMI值為:");
System.out.print(bmi);
if (bmi < 18.5)
System.out.println("\nBMI = " + bmi + " 過輕。\n");
else if (bmi >= 18.5 && bmi < 24)
System.out.println("\nBMI = " + bmi + " 正常體重。\n");
else if (bmi >= 24 && bmi < 27)
System.out.println("\nBMI = " + bmi + " 過重。\n");
else
System.out.println("\nBMI = " + bmi + " 肥胖。\n");
}
}

B10133030林潔如 提到...

import java.util.*;
class BBBB { public static void main (String [] args){
Scanner input=new Scanner(System.in);
float m=160;
float w=52;
float bmi=(float)w/(m*m)*10000;
System.out.println(bmi);

if (bmi < 18.5 )
{System.out.println("過輕");
}

else if ( bmi < 24 )
{System.out.println("正常體重");
}
else if ( bmi < 27 )
{System.out.println("過重");
}

else
{System.out.println("肥胖");
}

B10133003王冠文 提到...

public class test{
public static void main(String[]atgs){
int m=165;
int w=53;
float bmi=(float)w/(m*m)*10000;
if(bmi<18.5){
System.out.print("過輕");
}
else if (bmi<24){
System.out.print("一般");
}
else{
System.out.print("過重");
}
}
}

B10133009 王韋翔 提到...

class test
{
public static void main(String[] args)
{
float m =170;
float w =63;
float bmi = w/(m*m)*10000;

if(bmi<18.5)
{
System.out.print("bmi="+bmi+"為過輕");
}
else if(bmi>=18.5&&bmi<24)
{
System.out.print("bmi="+bmi+"為正常");
}
else if(bmi>=24&&bmi<27)
{
System.out.print("bmi="+bmi+"為過重");
}
else if(bmi>=27)
{
System.out.print("bmi="+bmi+"為肥胖");
}
}
}

B10133038池侑承 提到...

public class apple{
public static void main(String[] args){
int m=172;
int w=88;
float bmi=(float)w/(m*m)*10000;
if(bmi<18.5){
System.out.print("過輕");
}
else if (bmi<24){
System.out.print("一般");
}
else if(bmi<27){
System.out.print("過重");
}
else
System.out.print("肥胖");
}
}

B10133033呂之筠 提到...

class bb
{
public static void main(String[] args)
{
float m =160;
float w =52;
float bmi = w/(m*m)*10000;

if(bmi<18.5)
{
System.out.print("bmi="+bmi+"為過輕");
}
else if(bmi>=18.5&&bmi<=24)
{
System.out.print("bmi="+bmi+"為正常");
}
else if(bmi>=24&&bmi<27)
{
System.out.print("bmi="+bmi+"為過重");
}
else if(bmi>=27)
{
System.out.print("bmi="+bmi+"為肥胖");
}
}
}

B10133011黃怡蓁 提到...

import java.util.*;
class bmi {
public static void main (String [] args){
Scanner input=new Scanner(System.in);
float m=160;
float w=50;
float bmi=(float)w/(m*m)*10000;
System.out.println(bmi);
if (bmi < 18.5 ) {
System.out.println("過輕"); }
else if ( bmi <24){
System.out.println("正常體重"); }
else if ( bmi <27){
System.out.println("過重"); }
else {
System.out.println("肥胖"); }
}
}

B10133003王冠文 提到...

public class test{
public static void main(String[]atgs){
int m=165;
int w=53;
float bmi=(float)w/(m*m)*10000;
if(bmi<18.5){
System.out.print("過輕");
}
else if (bmi<24){
System.out.print("一般");
}
else if (bmi<27){
System.out.print("過重");
}
else{
System.out.print("肥胖");
}
}
}

B10133045林玹安 提到...

public class apple {
public static void main(String[]atgs){
int m=167;
int w=57;
float bmi=(float)w/(m*m)*10000;
if(bmi<18.5){
System.out.print("過輕");
}
else if (bmi<24){
System.out.print("一般");
}
else if (bmi<27){
System.out.print("過重");
}
else{
System.out.print("肥胖");
}
}

}

B10133006游善棠 提到...

public class apple{
public static void main(String[]args){
int m=180;
int w=95;
Float bmi=(float)w/(m*m)*10000;
if (bmi<18.5){
System.out.print("過輕");
}
else if (bmi<24) {
System.out.print("一般");
}
else if (bmi<27) {
System.out.print("過重");
}
else{
System.out.print("肥胖");
}
}

}

b10133007蔡雅姿 提到...

class test
{
public static void main(String[] args)
{
float m =168;
float w =57;
float bmi = w/(m*m)*10000;

if(bmi<18.5)
{
System.out.print("bmi="+bmi+"為過輕");
}
else if(bmi<=24)
{
System.out.print("bmi="+bmi+"為正常");
}
else if(bmi<27)
{
System.out.print("bmi="+bmi+"為過重");
}
else if(bmi>=27)
{
System.out.print("bmi="+bmi+"為肥胖");
}
}
}

B10133002謝佩紋 提到...

import java.util.*; class bmi { public static void main (String [] args){ Scanner input=new Scanner(System.in); float m=145; float w=38; float bmi=(float)w/(m*m)*10000; System.out.println(bmi); if (bmi < 18.5 ) {System.out.println("過輕"); } else if ( bmi < 24 ){ System.out.println("正常體重"); } else if ( bmi < 27 ){ System.out.println("過重"); } else System.out.println("肥胖"); } }

B10133031邱敏惠 提到...

import java.util.*;
class bmi {
public static void main (String [] args){
Scanner input=new Scanner(System.in);
float m=165;
float w=55;
float bmi=(float)w/(m*m)*10000;
System.out.println(bmi);
if (bmi < 18.5 ) {
System.out.println("過輕"); }
else if ( bmi <24){
System.out.println("正常體重"); }
else if ( bmi <27){
System.out.println("過重"); }
else {
System.out.println("肥胖"); }
}
}

B10133009 王韋翔 提到...

class test
{
public static void main(String[] args)
{
float m =170;
float w =63;
float bmi = w/(m*m)*10000;

if(bmi<18.5)
{
System.out.print("bmi="+bmi+"為過輕");
}
else if(bmi<24)
{
System.out.print("bmi="+bmi+"為正常");
}
else if(bmi<27)
{
System.out.print("bmi="+bmi+"為過重");
}
else if(bmi>=27)
{
System.out.print("bmi="+bmi+"為肥胖");
}
}
}

B10133032黃徐琨 提到...

import java.util.*;
public class aa
{
public static void main(String[] args)
{
Scanner input=new Scanner(System.in);
System.out.println("請輸入身高");
int x =input.nextInt();
System.out.println(x);
System.out.println("請輸入體重");
int y =input.nextInt();
System.out.println(y);
float bmi=(float) y/(x*x)*10000;
System.out.print("你的BMI值為:");
System.out.print(bmi);
if (bmi < 18.5)
System.out.println("\nBMI = " + bmi + " 過輕。\n");
else if (bmi < 24)
System.out.println("\nBMI = " + bmi + " 正常體重。\n");
else if ( bmi < 27)
System.out.println("\nBMI = " + bmi + " 過重。\n");
else
System.out.println("\nBMI = " + bmi + " 肥胖。\n");
}
}

B10133050張珈祥 提到...

class test
{
public static void main(String[] args)
{
float m =166;
float w =66;
float bmi = w/(m*m)*10000;

if(bmi<18.5)
{
System.out.print("bmi="+bmi+"為過輕");
}
else if(bmi<24)
{
System.out.print("bmi="+bmi+"為正常");
}
else if(bmi<27)
{
System.out.print("bmi="+bmi+"為過重");
}
else if(bmi>=27)
{
System.out.print("bmi="+bmi+"為肥胖");
}
}
}

B10133043陳宗霖 提到...

import java.util.*;
public class aa
{
public static void main(String[] args)
{
Scanner input=new Scanner(System.in);
System.out.println("請輸入身高");
int x =input.nextInt();
System.out.println(x);
System.out.println("請輸入體重");
int y =input.nextInt();
System.out.println(y);
float bmi=(float) y/(x*x)*10000;
System.out.print("你的BMI值為:");
System.out.print(bmi);
if (bmi < 18.5)
System.out.println("\nBMI = " + bmi + " 過輕。\n");
else if (bmi < 24)
System.out.println("\nBMI = " + bmi + " 正常體重。\n");
else if ( bmi < 27)
System.out.println("\nBMI = " + bmi + " 過重。\n");
else
System.out.println("\nBMI = " + bmi + " 肥胖。\n");
}
}

B10133005李沛澤 提到...

import java.util.*;
public class ss
{
public static void main(String[] args)
{
Scanner input=new Scanner(System.in);
System.out.println("請輸入身高");
int x =input.nextInt();
System.out.println(x);
System.out.println("請輸入體重");
int y =input.nextInt();
System.out.println(y);
float bmi=(float) y/(x*x)*10000;
System.out.print("你的BMI值為:");
System.out.print(bmi);
if (bmi < 18.5)
System.out.println("\nBMI = " + bmi + " 過輕。\n");
else if (bmi < 24)
System.out.println("\nBMI = " + bmi + " 正常體重。\n");
else if ( bmi < 27)
System.out.println("\nBMI = " + bmi + " 過重。\n");
else
System.out.println("\nBMI = " + bmi + " 肥胖。\n");
}
}

B10133029 彭義竣 提到...

Scanner inputScanner = new Scanner(System.in);
float m = inputScanner.nextFloat(); // 輸入身高
float w = inputScanner.nextFloat(); // 輸入體重
float bmi = w / (m * m) * 10000;
if (bmi < 18.5)
{
System.out.println("過輕");
}
else if ((bmi >= 18.5) && (bmi < 24))
{
System.out.println("正常");
}
else if ((bmi >= 24) && (bmi < 27))
{
System.out.println("過重");
}
else
{
System.out.println("肥胖");
}

B10133036孫翊玲 提到...

class aa
{
public static void main(String[] args)
{
float m =160;
float w =60;
float bmi = w/(m*m)*10000;

if(bmi<18.5)
{
System.out.print("bmi="+bmi+"為過輕");
}
else if(bmi<=24)
{
System.out.print("bmi="+bmi+"為正常");
}
else if(bmi<27)
{
System.out.print("bmi="+bmi+"為過重");
}
else if(bmi>=27)
{
System.out.print("bmi="+bmi+"為肥胖");
}
}
}

B10133033呂之筠 提到...

class bb
{
public static void main(String[] args)
{
float m =160;
float w =52;
float bmi = w/(m*m)*10000;

if(bmi<18.5)
{
System.out.print("bmi="+bmi+"為過輕");
}
else if(bmi<=24)
{
System.out.print("bmi="+bmi+"為正常");
}
else if(bmi<27)
{
System.out.print("bmi="+bmi+"為過重");
}
else if(bmi>=27)
{
System.out.print("bmi="+bmi+"為肥胖");
}
}
}

B10133037施竣哲 提到...

import java.util.*;
public class aa
{
public static void main(String[] args)
{
Scanner input=new Scanner(System.in);
System.out.println("請輸入身高");
int x =input.nextInt();
System.out.println(x);
System.out.println("請輸入體重");
int y =input.nextInt();
System.out.println(y);
float bmi=(float) y/(x*x)*10000;
System.out.print("你的BMI值為:");
System.out.print(bmi);
if (bmi < 18.5)
System.out.println("\nBMI = " + bmi + " 過輕。\n");
else if (bmi < 24)
System.out.println("\nBMI = " + bmi + " 正常體重。\n");
else if ( bmi < 27)
System.out.println("\nBMI = " + bmi + " 過重。\n");
else
System.out.println("\nBMI = " + bmi + " 肥胖。\n");
}
}

B10133042沈俞宜 提到...

import java.util.*;public class 123 {public static void main(String[] args) {Scanner input=new Scanner(System.in);int m=input.nextInt();int w=input.nextInt();float bmi=(float)w/(m*m)*10000;System.out.println(bmi);if ( bmi<18.4 ){ System.out.println("過輕");}else if (bmi <24 ){ System.out.println("標準");}else if (bmi >24 ){ System.out.println("過重");}else { System.out.println("肥胖");}}}.

B10133010蔡以翎 提到...

class bb
{
public static void main(String[] args)
{
float m =150;
float w =50;
float bmi = w/(m*m)*10000;

if(bmi<18.5)
{
System.out.print("bmi="+bmi+"為過輕");
}
else if(bmi<=24)
{
System.out.print("bmi="+bmi+"為正常");
}
else if(bmi<27)
{
System.out.print("bmi="+bmi+"為過重");
}
else if(bmi>=27)
{
System.out.print("bmi="+bmi+"為肥胖");
}
}
}

B10133004徐芷瑩 提到...

class bb
{
public static void main(String[] args)
{
float m =150;
float w =40;
float bmi = w/(m*m)*10000;

if(bmi<18.5)
{
System.out.print("bmi="+bmi+"為過輕");
}
else if(bmi<=24)
{
System.out.print("bmi="+bmi+"為正常");
}
else if(bmi<27)
{
System.out.print("bmi="+bmi+"為過重");
}
else if(bmi>=27)
{
System.out.print("bmi="+bmi+"為肥胖");
}
}
}

B10133048饒家華 提到...

class BMI{
public static void main(String[] args)
{
int w=161;
int m=51;
float bmi=(float) w/(m*m);
if ( bmi < 18.5 )
{
System.out.println("體重過輕");
}
else if ( bmi < 24 )
{
System.out.println("體重正常");
}
else
{
System.out.println("體重過重");
}
}
}

B1013301林子恩 提到...

class BMI
{
public static void main(String[] arge)
{
float m =168;
float w =68;
float bmi = w/(m*m)*10000;

if (bmi<18.5)
{
System.out.print("bmi="+bmi+"為過輕");
}
else if(bmi<24)
{
System.out.print("bmi="+bmi+"為正常");
}
else if(bmi<27)
{
System.out.print("bmi="+bmi+"為過重");
}
else if(bmi>=27)
{
System.out.print("bmi="+bmi+"為肥胖");
}
}
}

b10133013林子恩 提到...

class BMI
{
public static void main(String[] arge)
{
float m =168;
float w =68;
float bmi = w/(m*m)*10000;

if (bmi<18.5)
{
System.out.print("bmi="+bmi+"為過輕");
}
else if(bmi<24)
{
System.out.print("bmi="+bmi+"為正常");
}
else if(bmi<27)
{
System.out.print("bmi="+bmi+"為過重");
}
else if(bmi>=27)
{
System.out.print("bmi="+bmi+"為肥胖");
}
}
}

B10133025王柏文 提到...

class BMI
{
public static void main(String[] arge)
{
float m =165;
float w =55;
float bmi = w/(m*m)*10000;

if (bmi<18.5)
{
System.out.print("bmi="+bmi+"為過輕");
}
else if(bmi<24)
{
System.out.print("bmi="+bmi+"為正常");
}
else if(bmi<27)
{
System.out.print("bmi="+bmi+"為過重");
}
else if(bmi>=27)
{
System.out.print("bmi="+bmi+"為肥胖");
}
}
}

B10133051張丞緯 提到...

class BMI
{
public static void main(String[] arge)
{
float m =179;
float w =63;
float bmi = w/(m*m)*10000;

if (bmi<18.5)
{
System.out.print("bmi="+bmi+"為過輕");
}
else if(bmi<24)
{
System.out.print("bmi="+bmi+"為正常");
}
else if(bmi<27)
{
System.out.print("bmi="+bmi+"為過重");
}
else if(bmi>=27)
{
System.out.print("bmi="+bmi+"為肥胖");
}
}
}

B10133048饒家華 提到...

public class BMI {
public static void main(String[]atgs){
int m=161;
int w=51;
float bmi=(float)w/(m*m)*10000;
if(bmi<18.5){
System.out.print("過輕");
}
else if (bmi<24){
System.out.print("一般");
}
else if (bmi<27){
System.out.print("過重");
}
else{
System.out.print("肥胖");
}
}

}

B10133016王致翔 提到...

public class MtcTW
{
public static void main(String[] args)
{
int m=177;
int w=54;
float bmi=(float)w/(m*m)*10000;
if(bmi<18.5)
{
System.out.print("過輕");
}
else if (bmi<24)
{
System.out.print("一般");
}
else if(bmi<27)
{
System.out.print("過重");
}
else
System.out.print("肥胖");
}
}

B10133023徐顥 提到...

public class sam{
public static void main(String[] args){
int m=170;
int w=60;
float bmi=(float)w/(m*m)*10000;
if(bmi<18.5){
System.out.print("過輕");
}
else if (bmi<24){
System.out.print("一般");
}
else if(bmi<27){
System.out.print("過重");
}
else
System.out.print("肥胖");
}
}

b10133022蔡承霖 提到...

public class fir{
public static void main(String[] args){
float m=162;
float w=51;
float bmi=w/(m*m)*10000;
if(bmi>=27){
System.out.print("肥胖");
}
else if(bmi>=24){
System.out.print("過重");
}
else if(bmi>=18.5){
System.out.print("正常體重");
}
else
System.out.print("過輕");
}
}

b10133028李炳燁 提到...

import java.util.*;
public class aa
{
public static void main(String[] args)
{
Scanner input=new Scanner(System.in);
System.out.println("請輸入身高");
int x =input.nextInt();
System.out.println(x);
System.out.println("請輸入體重");
int y =input.nextInt();
System.out.println(y);
float bmi=(float) y/(x*x)*10000;
System.out.print("你的BMI值為:");
System.out.print(bmi);
if (bmi < 18.5)
System.out.println("\nBMI = " + bmi + " 過輕。\n");
else if (bmi >= 18.5 && bmi < 24)
System.out.println("\nBMI = " + bmi + " 正常體重。\n");
else if (bmi >= 24 && bmi < 27)
System.out.println("\nBMI = " + bmi + " 過重。\n");
else
System.out.println("\nBMI = " + bmi + " 肥胖。\n");
}
}

B10133035章魚敏 提到...

public class test{
public static void main(String[]atgs){
int m=165;
int w=53;
float bmi=(float)w/(m*m)*10000;
if(bmi<18.5){
System.out.print("過輕");
}
else if (bmi<24){
System.out.print("一般");
}
else{
System.out.print("過重");
}
}
}

B10133035張于敏 提到...

public class test{
public static void main(String[]atgs){
int m=165;
int w=53;
float bmi=(float)w/(m*m)*10000;
if(bmi<18.5){
System.out.print("過輕");
}
else if (bmi<24){
System.out.print("一般");
}
else{
System.out.print("過重");
}
}
}

B10133054林辰星 提到...

public class aa {
public static void main(String[] args){
float m=168;
float w=54;
float bmi=w/(m*m)*10000;
if(bmi>=27){
System.out.print("肥胖");
}
else if(bmi>=24){
System.out.print("過重");
}
else if(bmi>=18.5){
System.out.print("正常體重");
}
else {

System.out.print("過輕");
}
}
}

B10133053古聿穎 提到...

public class bmi {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub

double m=1.62, w=75 ;
float bmi ;
bmi =(float) (w/(m*m));
System.out.println(bmi) ;


if (bmi < 18.5)
System.out.println("過輕");
else if (bmi <24)
System.out.println("正常");
else if (bmi <27)
System.out.println("過重");
else
System.out.println("肥胖");
}

}

B10133053古聿穎 提到...

public class bmi {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub

double m=1.62, w=75 ;
float bmi ;
bmi =(float) (w/(m*m));
System.out.println(bmi) ;


if (bmi < 18.5)
System.out.println("過輕");
else if (bmi <24)
System.out.println("正常");
else if (bmi <27)
System.out.println("過重");
else
System.out.println("肥胖");
}

}

b9833091陳孟偉 提到...

public class NYPD {

public static void main(String[] args) {
// TODO Auto-generated method stub
float h=177,w=100;
float bmi=w/(h*h)*10000;
if(bmi<18.5){
System.out.println("過輕~");
}else if(bmi<24){
System.out.println("正常~");
}else if(bmi<27){
System.out.println("過重~");
} else{
System.out.println("肥胖~");
}
}

}

B10133040 溫翊惠 提到...

public class aa {
public static void main(String[] args){
float m=170;
float w=60;
float bmi=w/(m*m)*10000;
if(bmi>=27){
System.out.print("肥胖");
}
else if(bmi>=24){
System.out.print("過重");
}
else if(bmi>=18.5){
System.out.print("正常體重");
}
else {

System.out.print("過輕");
}
}
}

B10133020 李涵清 提到...

public class bmi {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub

double m=1.62, w=75 ;
float bmi ;
bmi =(float) (w/(m*m));
System.out.println(bmi) ;


if (bmi < 18.5)
System.out.println("過輕");
else if (bmi <24)
System.out.println("正常");
else if (bmi <27)
System.out.println("過重");
else
System.out.println("肥胖");
}

}

b9933180陳威羽 提到...

public class ifelseBMI {

static public void main (String[] args){

double m=1.65,w=55,BMI;
BMI=w/(m*m);
System.out.println("BMI="+BMI);
if (BMI<18.5)
System.out.println("過輕");
else if (BMI<24)
System.out.println("正常");
else if (BMI<27)
System.out.println("過重");
else
System.out.println("肥胖");
}
}

b9933180陳威羽 提到...

public class ifelseBMI {

static public void main (String[] args){

double m=1.65,w=55,BMI;
BMI=w/(m*m);
System.out.println("BMI="+BMI);
if (BMI<18.5)
System.out.println("過輕");
else if (BMI<24)
System.out.println("正常");
else if (BMI<27)
System.out.println("過重");
else
System.out.println("肥胖");
}
}

B10133047 鄭兆珊 提到...

public class SAN{
public static void main(String[] args){
float m=164;
float w=52;
float bmi=w/(m*m)*10000;
if(bmi>=27){
System.out.print("肥胖");
}
else if(bmi>=24){
System.out.print("過重");
}
else if(bmi>=18.5){
System.out.print("正常");
}
else
System.out.print("過輕");
}
}

B10133034石嘉萱 提到...

class aa
{
public static void main(String[] args)
{
float m =160;
float w =60;
float bmi = w/(m*m)*10000;

if(bmi<18.5)
{
System.out.print("bmi="+bmi+"為過輕");
}
else if(bmi<=24)
{
System.out.print("bmi="+bmi+"為正常");
}
else if(bmi<27)
{
System.out.print("bmi="+bmi+"為過重");
}
else if(bmi>=27)
{
System.out.print("bmi="+bmi+"為肥胖");
}
}
}

B10133049 連于瑄 提到...

class bb
{
public static void main(String[] args)
{
float m =160;
float w =52;
float bmi = w/(m*m)*10000;

if(bmi<18.5)
{
System.out.print("bmi="+bmi+"為過輕");
}
else if(bmi<=24)
{
System.out.print("bmi="+bmi+"為正常");
}
else if(bmi<27)
{
System.out.print("bmi="+bmi+"為過重");
}
else if(bmi>=27)
{
System.out.print("bmi="+bmi+"為肥胖");
}
}
}

B10133034石嘉萱 提到...

class aa
{
public static void main(String[] args)
{
float m =160;
float w =60;
float bmi = w/(m*m)*10000;

if(bmi<18.5)
{
System.out.print("bmi="+bmi+"為過輕");
}
else if(bmi<=24)
{
System.out.print("bmi="+bmi+"為正常");
}
else if(bmi<27)
{
System.out.print("bmi="+bmi+"為過重");
}
else if(bmi>=27)
{
System.out.print("bmi="+bmi+"為肥胖");
}
}
}

B10133019 王騰侑 提到...

public class bmi {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub

double m = 1.77 , w = 87 ;
float bmi ;
bmi = (float) (w/(m*m)) ;
System.out.println(bmi);

if (bmi < 18.5)
System.out.println("過輕");
else if (bmi <24)
System.out.println("正常");
else if (bmi < 27)
System.out.println("過重");
else
System.out.println("肥胖");
}

}

B10133019 王騰侑 提到...

public class bmi {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub

double m = 1.77 , w = 87 ;
float bmi ;
bmi = (float) (w/(m*m)) ;
System.out.println(bmi);

if (bmi < 18.5)
System.out.println("過輕");
else if (bmi <24)
System.out.println("正常");
else if (bmi < 27)
System.out.println("過重");
else
System.out.println("肥胖");
}

}

Related Posts Plugin for WordPress, Blogger...

熱門文章