herrDeng網內搜尋

自訂搜尋

Ads

2014年3月18日 星期二

Java作業6 bmi判斷



請用if-else-if 判斷BMI情形:
過輕:BMI<18.5
正常: 18.5<=BMI<24
過重:24<=BMI<27
輕度肥胖:27 <= BMI < 30
中度肥胖:30 <= BMI < 35
重度肥胖:BMI <= 35

40 則留言:

B10233062 黃聖評 提到...

import java.util.Scanner;


public class she1 {

public static void main(String[] args) {
Scanner input=new Scanner(System.in);

System.out.println("輸入身高M=:");
Double m = input.nextDouble();
System.out.println(m);
System.out.println("輸入體重W=:");
Double w = input.nextDouble();
System.out.println(w);
System.out.println("BMI " + w / (m * m));
double bmi = 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 if(bmi<30)
System.out.println("輕度肥胖");
else if(bmi<35)
System.out.println("中度肥胖");
else
System.out.println("重度肥胖");
}

}

B10233110 提到...

package aaa03181;

import java.util.Scanner;


public class aaa0318 {

private static Scanner input;

public static void main(String[] args) {
input = new Scanner(System.in);

System.out.println("輸入身高M=:");
Double m = input.nextDouble();
System.out.println(m);
System.out.println("輸入體重W=:");
Double w = input.nextDouble();
System.out.println(w);
System.out.println("BMI " + w / (m * m));
double bmi = 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 if(bmi<30)
System.out.println("輕度肥胖");
else if(bmi<35)
System.out.println("中度肥胖");
else
System.out.println("重度肥胖");
}

}

B10233110徐上竣 提到...

package aaa0318;

import java.util.Scanner;


public class aaa0318 {

private static Scanner input;

public static void main(String[] args) {
input = new Scanner(System.in);

System.out.println("輸入身高M=:");
Double m = input.nextDouble();
System.out.println(m);
System.out.println("輸入體重W=:");
Double w = input.nextDouble();
System.out.println(w);
System.out.println("BMI " + w / (m * m));
double bmi = 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 if(bmi<30)
System.out.println("輕度肥胖");
else if(bmi<35)
System.out.println("中度肥胖");
else
System.out.println("重度肥胖");
}

}

B10233069連于傑 提到...


package dfswfz;

import java.util.Scanner;

public class hallo {

private static final double BMI = 0;

public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.println("身高:");
double m=input.nextDouble();
System.out.println(m);
System.out.println("體重:");
double b=input.nextDouble();
System.out.println(b);
System.out.println("BMI="+b/(m*m));

if(BMI<=18.5){
System.out.println("過輕");
}else if(BMI>=24)
System.out.println("正常");
else if(BMI>=27)
System.out.println("過重");
else if(BMI<=30)
System.out.println("輕度肥胖");
else if(BMI<=35)
System.out.println("重度肥胖");
}
}

B10233082唐偉強 提到...

package dfswfz;

import java.util.Scanner;

public class hallo {

private static final double BMI = 0;

public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.println("身高:");
double m=input.nextDouble();
System.out.println(m);
System.out.println("體重:");
double b=input.nextDouble();
System.out.println(b);
System.out.println("BMI="+b/(m*m));

if(BMI<=18.5){
System.out.println("過輕");
}else if(BMI>=24)
System.out.println("正常");
else if(BMI>=27)
System.out.println("過重");
else if(BMI<=30)
System.out.println("輕度肥胖");
else if(BMI<=35)
System.out.println("重度肥胖");
}
}

Y10211064 黃耀葦 提到...

package abcd1234;
import java.util.Scanner;
public class abcd1234 {
private static Scanner input;
public static void main(String[] args) {
input = new Scanner(System.in);
System.out.println("輸入身高M=:");
Double m = input.nextDouble();
System.out.println(m);
System.out.println("輸入體重W=:");
Double w = input.nextDouble();
System.out.println(w);
System.out.println("BMI " + w / (m * m));
double bmi = 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 if(bmi<30)
System.out.println("輕度肥胖");
else if(bmi<35)
System.out.println("中度肥胖");
else
System.out.println("重度肥胖");

B10233090 提到...

package fffffff;

import java.util.Scanner;

public class jjjjjjj {

public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.println("輸入整數m(公尺)=");
double m=input.nextDouble();
System.out.println(m);
System.out.println("輸入整數w(公斤)=");
double w=input.nextDouble();
System.out.println(w);
System.out.println("BMI="+w/(m*m));
double bmi=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 if(bmi<30)
System.out.println("輕度肥胖");
else if(bmi<35)
System.out.println("中度肥胖");
else
System.out.println("重度肥胖");

}
}

B10233087 黃少洋 提到...

package hello1;

import java.util.Scanner;

public class abc {

private static final double Bmi = 0;

public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.println("身高m=");
Double m=input.nextDouble();
System.out.println(m);
System.out.println("體重w=");
Double w=input.nextDouble();
System.out.println(w);
System.out.println("BMI="+(w/(m*m)));
if(Bmi<=18.5)
System.out.println("過輕");
else if(Bmi>=24)
System.out.println("正常");
else if(Bmi>=27)
System.out.println("過重");
else if(Bmi>=30)
System.out.println("輕度肥胖");
else if(Bmi>=35)
System.out.println("重度肥胖");
}
}

B10233102 提到...

package fffffff;

import java.util.Scanner;

public class jjjjjjj {

public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.println("輸入整數m(公尺)=");
double m=input.nextDouble();
System.out.println(m);
System.out.println("輸入整數w(公斤)=");
double w=input.nextDouble();
System.out.println(w);
System.out.println("BMI="+w/(m*m));
double bmi=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 if(bmi<30)
System.out.println("輕度肥胖");
else if(bmi<35)
System.out.println("中度肥胖");
else
System.out.println("重度肥胖");

}
}

B10233092 提到...

package hh;

import java.util.Scanner;

public class ss {

public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.println("輸入整數m(公尺)=");
double m=input.nextDouble();
System.out.println(m);
System.out.println("輸入整數w(公斤)=");
double w=input.nextDouble();
System.out.println(w);
System.out.println("BMI="+w/(m*m));
double bmi=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 if(bmi<30)
System.out.println("輕度肥胖");
else if(bmi<35)
System.out.println("中度肥胖");
else
System.out.println("重度肥胖");

}
}

B10233079 提到...

package fffffff;

import java.util.Scanner;

public class jjjjjjj {

public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.println("輸入整數m(公尺)=");
double m=input.nextDouble();
System.out.println(m);
System.out.println("輸入整數w(公斤)=");
double w=input.nextDouble();
System.out.println(w);
System.out.println("BMI="+w/(m*m));
double bmi=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 if(bmi<30)
System.out.println("輕度肥胖");
else if(bmi<35)
System.out.println("中度肥胖");
else
System.out.println("重度肥胖");

}
}

B10233089 提到...

package hello0318;
import java.util.*;
public class hello {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.println("輸入整數m(公尺)");
double m=input.nextDouble();
System.out.println(m);
System.out.println("輸入整數w(公斤)");
double w=input.nextDouble();
System.out.println(w);
System.out.println("BMI="+w/(m*m));
double BMI=input.nextDouble();
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 if (BMI<30)
System.out.println("輕度肥胖");
else if (BMI<35)
System.out.println("中度肥胖");
else
System.out.println("重度肥胖");
}
}

B10233067 提到...

package hello318;
import java.util.*;
public class hello {
public static void main(String[] args) {
Scanner input=new Scanner (System.in);
System.out.println("輸入整數m(公尺)");
double m =input.nextDouble();
System.out.println(m);
System.out.println("輸入整數y(公斤)");
double y =input.nextDouble();
System.out.println(y);
System.out.println("BMI="+y/(m*m));
double BMI =input.nextDouble();
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 if (BMI<30)
System.out.println("輕度肥胖");
else if (BMI<35)
System.out.println("中度肥胖");
else
System.out.println("重度肥胖");
}
}

B10233061 吳興強 提到...


package hello;
import java.util.*;
public class hello0318{

public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.println("輸入身高(公尺)=");
double x=input.nextDouble();
System.out.println(x);
System.out.println("輸入體重(公斤)=");
double y=input.nextDouble();
double b=y/(x*x);
System.out.println(y);
System.out.println("BMI="+b);

if (b<18.5)
System.out.println("過輕");
else if (b<24)
System.out.println("正常");

else if (b<27)
System.out.println("過重");

else if (b<30)
System.out.println("輕度肥胖");

else if (b<35)
System.out.println("中度肥胖");

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

}

B10233064 莊英霆 提到...

package Line;
import java.util.*;
public class hello0318 {

public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.println("輸入身高(公尺)=");
double x=input.nextDouble();
System.out.println(x);
System.out.println("輸入體重(公斤)=");
double y=input.nextDouble();
System.out.println(y);
double B = y/(x*x);
System.out.println("BMI="+B);
if (B < 18.5)
System.out.println("過輕");
else if (B < 24)
System.out.println("正常");
else if (B < 27)
System.out.println("過重");
else if (B < 30)
System.out.println("輕度肥胖");
else if (B < 35)
System.out.println("中度胖子");
else
System.out.println("重度肥胖");
}
}

B10233077 提到...

package dfswfz;

import java.util.Scanner;

public class hallo {

private static final double BMI = 0;

public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.println("身高:");
double m=input.nextDouble();
System.out.println(m);
System.out.println("體重:");
double b=input.nextDouble();
System.out.println(b);
System.out.println("BMI="+b/(m*m));

if(BMI<=18.5){
System.out.println("過輕");
}else if(BMI>=24)
System.out.println("正常");
else if(BMI>=27)
System.out.println("過重");
else if(BMI<=30)
System.out.println("輕度肥胖");
else if(BMI<=35)
System.out.println("重度肥胖");
}
}

B10233075謝如華 提到...

package hello;

import java.util.*;

public class hello {

public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.println("輸入整數m(公尺)=");
double m=input.nextDouble();
System.out.println(m);
System.out.println("輸入整數w(公斤)=");
double w=input.nextDouble();
System.out.println(w);
System.out.println("BMI="+w/(m*m));
double bmi=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 if(bmi<30)
System.out.println("輕度肥胖");
else if(bmi<35)
System.out.println("重度肥胖");


}

}

b10233107蔡育霖 提到...

package Line;
import java.util.*;
public class hello0318 {

public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.println("輸入身高(公尺)=");
double x=input.nextDouble();
System.out.println(x);
System.out.println("輸入體重(公斤)=");
double y=input.nextDouble();
System.out.println(y);
double B = y/(x*x);
System.out.println("BMI="+B);
if (B < 18.5)
System.out.println("過輕");
else if (B < 24)
System.out.println("正常");
else if (B < 27)
System.out.println("過重");
else if (B < 30)
System.out.println("輕度肥胖");
else if (B < 35)
System.out.println("中度胖子");
else
System.out.println("重度肥胖");
}
}

B10233081藍立凱 提到...

package hello0318;

import java.util.Scanner;


public class hello {

public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner input=new Scanner(System.in);
System.out.println("輸入整數m(公尺)=");
double m=input.nextDouble();
System.out.println(m);
System.out.println("輸入整數w(公斤)=");
double w=input.nextDouble();
System.out.println(w);
System.out.println("BMI="+w/(m*m));
double bmi=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 if(bmi<30)
System.out.println("輕度肥胖");
else if(bmi<35)
System.out.println("重度肥胖");


}

}

B10233091許少威 提到...

package hello0318;


import java.util.*;

public class hello {

public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.println("輸入整數m(公尺)=");
double m=input.nextDouble();
System.out.println(m);
System.out.println("輸入整數w(公斤)=");
double w=input.nextDouble();
System.out.println(w);
System.out.println("BMI="+w/(m*m));
double bmi=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 if(bmi<30)
System.out.println("輕度肥胖");
else if(bmi<35)
System.out.println("重度肥胖");


}

}

B10233076 提到...

package hello;

import java.util.*;

public class hello{

public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.println("輸入整數m(公尺)=");
double m=input.nextDouble();
System.out.println(m);
System.out.println("輸入整數w(公斤)=");
double w=input.nextDouble();
System.out.println(w);
System.out.println("BMI="+w/(m*m));
double bmi=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 if(bmi<30)
System.out.println("輕度肥胖");
else if(bmi<35)
System.out.println("重度肥胖");



}

}

B1033063 張宜禎 提到...

package hello0318;

import java.util.Scanner;

public class hello {

public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.println("輸入整數m(公尺)=");
double m=input.nextDouble();
System.out.println(m);
System.out.println("輸入整數w(公斤)=");
double w=input.nextDouble();
System.out.println(w);
System.out.println("BMI="+w/(m*m));
double bmi=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 if(bmi<30)
System.out.println("輕度肥胖");
else if(bmi<35)
System.out.println("重度肥胖");




}

}

輸入整數m(公尺)=
1.56
1.56
輸入整數w(公斤)=
40
40.0
BMI=16.43655489809336
16.43655489809336
過輕

B10233084 陳億如 提到...

package hello0318;
import java.util.*;
public class hello {

public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.println("輸入整數m(公尺)=");
double m=input.nextDouble();
System.out.println(m);
System.out.println("輸入整數w(公斤)=");
double w=input.nextDouble();
System.out.println(w);
System.out.println("BMI="+w/(m*m));
double bmi=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 if(bmi<30)
System.out.println("輕度肥胖");
else if(bmi<35)
System.out.println("重度肥胖"); }

}


輸入整數m(公尺)=
1.58
1.58
輸入整數w(公斤)=
55
55.0
BMI=22.031725684986377
22.031725684986377
正常

李元宏 提到...

package B10233095;

import java.util.Scanner;


public class B10233095 {

private static Scanner input;

public static void main(String[] args) {
input = new Scanner(System.in);

System.out.println("輸入身高M=:");
Double m = input.nextDouble();
System.out.println(m);
System.out.println("輸入體重W=:");
Double w = input.nextDouble();
System.out.println(w);
System.out.println("BMI " + w / (m * m));
double bmi = 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 if(bmi<30)
System.out.println("輕度肥胖");
else if(bmi<35)
System.out.println("中度肥胖");
else
System.out.println("重度肥胖");
}

}

李元宏 提到...

package B10233095;

import java.util.Scanner;


public class B10233095 {

private static Scanner input;

public static void main(String[] args) {
input = new Scanner(System.in);

System.out.println("輸入身高M=:");
Double m = input.nextDouble();
System.out.println(m);
System.out.println("輸入體重W=:");
Double w = input.nextDouble();
System.out.println(w);
System.out.println("BMI " + w / (m * m));
double bmi = 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 if(bmi<30)
System.out.println("輕度肥胖");
else if(bmi<35)
System.out.println("中度肥胖");
else
System.out.println("重度肥胖");
}

}

李元宏 提到...

package B10233095;

import java.util.Scanner;


public class B10233095 {

private static Scanner input;

public static void main(String[] args) {
input = new Scanner(System.in);

System.out.println("輸入身高M=:");
Double m = input.nextDouble();
System.out.println(m);
System.out.println("輸入體重W=:");
Double w = input.nextDouble();
System.out.println(w);
System.out.println("BMI " + w / (m * m));
double bmi = 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 if(bmi<30)
System.out.println("輕度肥胖");
else if(bmi<35)
System.out.println("中度肥胖");
else
System.out.println("重度肥胖");
}

}

李元宏 提到...

package B10233095;

import java.util.Scanner;


public class B10233095 {

private static Scanner input;

public static void main(String[] args) {
input = new Scanner(System.in);

System.out.println("輸入身高M=:");
Double m = input.nextDouble();
System.out.println(m);
System.out.println("輸入體重W=:");
Double w = input.nextDouble();
System.out.println(w);
System.out.println("BMI " + w / (m * m));
double bmi = 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 if(bmi<30)
System.out.println("輕度肥胖");
else if(bmi<35)
System.out.println("中度肥胖");
else
System.out.println("重度肥胖");
}

}

B10233068 邱佳函 提到...

package hello0318;

import java.security.Signer;

public class hello {

public static void main(String[] args) {
Scanner input=new Scanner (System.in);
System.out.println("輸入整數m(公尺)");
double m =input.nextDouble();
System.out.println(m);
System.out.println("輸入整數y(公斤)");
double y =input.nextDouble();
System.out.println(y);
System.out.println("BMI="+y/(m*m));

double BMI =y/(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 if (BMI<30)
System.out.println("輕度肥胖");
else if (BMI<35)
System.out.println("中度肥胖");
else
System.out.println("重度肥胖");


}

}

B10233065 黃曉玲 提到...

package hello0318;

import java.util.Scanner;

public class hello {

public static void main(String[] args) {

Scanner input=new Scanner (System.in);
System.out.println("輸入整數m(公尺)");
double m =input.nextDouble();
System.out.println(m);
System.out.println("輸入整數y(公斤)");
double y =input.nextDouble();
System.out.println(y);
System.out.println("BMI="+y/(m*m));

double BMI =y/(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 if (BMI<30)
System.out.println("輕度肥胖");
else if (BMI<35)
System.out.println("中度肥胖");
else
System.out.println("重度肥胖");

}

}

B10233108 林宣瑋 提到...

import java.util.Scanner;


public class LaoLin {

private static Scanner input;

public static void main(String[] args) {
input = new Scanner(System.in);
System.out.println("請輸入身高(公尺)=");
double x=input.nextDouble();
System.out.println(x);
System.out.println("請輸入體重(公斤)=");
double y=input.nextDouble();
System.out.println(y);
double B=y/(x*x);
System.out.println("BMI="+B);

if (B<18.5)
System.out.println("過輕");
else if (B<24)
System.out.println("正常");
else if (B<27)
System.out.println("過重");
else if (B<30)
System.out.println("輕度肥胖");
else if (B<35)
System.out.println("中度肥胖");
}

}

Y10211027 張君弘 提到...

package hello;

import java.util.Scanner;

public class hello0318 {


public static void main(String[] args) {
Scanner input=new Scanner(System.in);

System.out.println("輸入身高M=:");
Double m = input.nextDouble();
System.out.println(m);
System.out.println("輸入體重W=:");
Double w = input.nextDouble();
System.out.println(w);
System.out.println("BMI " + w / (m * m));
double bmi = 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 if(bmi<30)
System.out.println("輕度肥胖");
else if(bmi<35)
System.out.println("中度肥胖");
else
System.out.println("重度肥胖");
}

}

B10233071 提到...

package hello;

import java.util.Scanner;

public class hello0318 {


public static void main(String[] args) {
Scanner input=new Scanner(System.in);

System.out.println("輸入身高M=:");
Double m = input.nextDouble();
System.out.println(m);
System.out.println("輸入體重W=:");
Double w = input.nextDouble();
System.out.println(w);
System.out.println("BMI " + w / (m * m));
double bmi = 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 if(bmi<30)
System.out.println("輕度肥胖");
else if(bmi<35)
System.out.println("中度肥胖");
else
System.out.println("重度肥胖");
}

}

B10233066張哲毓 提到...

import java.util.Scanner;


public class hello318 {

public static void main(String[] args) {
Scanner input=new Scanner(System.in);

System.out.println("輸入身高M=:");
Double m = input.nextDouble();
System.out.println(m);
System.out.println("輸入體重W=:");
Double w = input.nextDouble();
System.out.println(w);
System.out.println("BMI " + w / (m * m));
double bmi = 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 if(bmi<30)
System.out.println("輕度肥胖");
else if(bmi<35)
System.out.println("中度肥胖");
else
System.out.println("重度肥胖");
}

}

B10233097 邱宥甄 提到...

import java.util.Scanner;


public class qq {

public static void main(String[] args) {

Scanner input=new Scanner(System.in);
System.out.println("請輸入身高(公尺)=");
double x=input.nextDouble();
System.out.println(x);
System.out.println("請輸入體重(公斤)=");
double y = input.nextDouble();
System.out.println(y);
double b= (y/(x*x));
System.out.println("BMI="+b);

if (b < 18.5) {
System.out.println("過輕");
} else if (b < 24) {
System.out.println("'正常");
} else if (b < 27){
System.out.println("過重");
} else if ( b < 30 ){
System.out.println("輕度肥胖");
} else if(b <35){
System.out.println("中度肥胖");
} else
System.out.println("重度肥胖");
}
}

B10233098 陳孟緣 提到...

import java.util.Scanner;


public class aa {

public static void main(String[] args) {

Scanner input=new Scanner(System.in);
System.out.println("請輸入身高(公尺)=");
double x=input.nextDouble();
System.out.println(x);
System.out.println("請輸入體重(公斤)=");
double y = input.nextDouble();
System.out.println(y);
double b= (y/(x*x));
System.out.println("BMI="+b);

if (b < 18.5) {
System.out.println("過輕");
} else if (b < 24) {
System.out.println("'正常");
} else if (b < 27){
System.out.println("過重");
} else if ( b < 30 ){
System.out.println("輕度肥胖");
} else if(b <35){
System.out.println("中度肥胖");
} else
System.out.println("重度肥胖");
}
}

B10233080 陳芊慈 提到...

import java.util.Scanner;


public class nn {

public static void main(String[] args) {

Scanner input=new Scanner(System.in);
System.out.println("請輸入身高(公尺)=");
double x=input.nextDouble();
System.out.println(x);
System.out.println("請輸入體重(公斤)=");
double y = input.nextDouble();
System.out.println(y);
double b= (y/(x*x));
System.out.println("BMI="+b);

if (b < 18.5) {
System.out.println("過輕");
} else if (b < 24) {
System.out.println("'正常");
} else if (b < 27){
System.out.println("過重");
} else if ( b < 30 ){
System.out.println("輕度肥胖");
} else if(b <35){
System.out.println("中度肥胖");
} else
System.out.println("重度肥胖");
}
}

B10233070 劉思涵 提到...

import java.util.Scanner;


public class ll {

public static void main(String[] args) {

Scanner input=new Scanner(System.in);
System.out.println("請輸入身高(公尺)=");
double x=input.nextDouble();
System.out.println(x);
System.out.println("請輸入體重(公斤)=");
double y = input.nextDouble();
System.out.println(y);
double b= (y/(x*x));
System.out.println("BMI="+b);

if (b < 18.5) {
System.out.println("過輕");
} else if (b < 24) {
System.out.println("'正常");
} else if (b < 27){
System.out.println("過重");
} else if ( b < 30 ){
System.out.println("輕度肥胖");
} else if(b <35){
System.out.println("中度肥胖");
} else
System.out.println("重度肥胖");
}
}

B9933029江軒澔 提到...

import java.util.Scanner;


public class she1 {

public static void main(String[] args) {
Scanner input=new Scanner(System.in);

System.out.println("輸入身高M=:");
Double m = input.nextDouble();
System.out.println(m);
System.out.println("輸入體重W=:");
Double w = input.nextDouble();
System.out.println(w);
System.out.println("BMI " + w / (m * m));
double bmi = 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 if(bmi<30)
System.out.println("輕度肥胖");
else if(bmi<35)
System.out.println("中度肥胖");
else
System.out.println("重度肥胖");
}

}

B10233073 楊博宇 提到...

package rgr013;

import java.util.Scanner;


public class rgr013 {

private static Scanner input;

public static void main(String[] args) {
input = new Scanner(System.in);

System.out.println("輸入身高M=:");
Double m = input.nextDouble();
System.out.println(m);
System.out.println("輸入體重W=:");
Double w = input.nextDouble();
System.out.println(w);
System.out.println("BMI " + w / (m * m));
double bmi = 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 if(bmi<30)
System.out.println("輕度肥胖");
else if(bmi<35)
System.out.println("中度肥胖");
else
System.out.println("重度肥胖");
}

}

B10233074 許逸憲 提到...

import java.util.Scanner;


public class she1 {

public static void main(String[] args) {
Scanner input=new Scanner(System.in);

System.out.println("輸入身高M=:");
Double m = input.nextDouble();
System.out.println(m);
System.out.println("輸入體重W=:");
Double w = input.nextDouble();
System.out.println(w);
System.out.println("BMI " + w / (m * m));
double bmi = 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 if(bmi<30)
System.out.println("輕度肥胖");
else if(bmi<35)
System.out.println("中度肥胖");
else
System.out.println("重度肥胖");
}

}

Related Posts Plugin for WordPress, Blogger...

熱門文章