herrDeng網內搜尋
自訂搜尋
Ads
訂閱:
張貼留言 (Atom)
熱門文章
-
教育部為提昇全民資安素養與電腦防護能力,本部於101年9月5日至11月5日舉辦「全民資安素養自我評量」活動,請在活動期間內踴躍上網檢測資訊安全素養認知程度,並有機會參與抽獎,詳情請參閱活動網站(網址: https://isafe.moe.edu.tw/event
-
先說明一下這是後知後覺的解答,所謂後知就是股票價格已知存在陣列(清單),當然就要用迴圈練習,雙迴圈暴力解需時O(n**2),當然不用,採python單一迴圈解答「最佳股票的買賣時機#LeetCode 121 Best Time to Buy and Sell Stock」,解...
-
url="https://www.twse.com.tw/exchangeReport/STOCK_DAY?response=json&date=20220330&stockNo=2330"
-
你會用C的算子sizeof?
-
Python CPP heap priority queue速解L eetcode 2530. Maximal Score After Applying K Operations heap/priority queue是重要的資料結構,無論是C++的std::priority_q...
-
C++ DP動態規劃解Leetcode 937 Maximum Number of Points with Cost 有些標示medium要比標示hard的問題還要難,Leetcode 1937. Maximum Number of Points with Cost,DP動態規...
40 則留言:
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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
過輕
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("中度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
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("重度肥胖");
}
}
張貼留言