請輸入姓名xyz、身高m(cm)、體重w(kg),
輸出為"xyz的BMI值=****"
註:BMI=w*10000/(m*m)
herrDeng網內搜尋
自訂搜尋
Ads
訂閱:
張貼留言 (Atom)
熱門文章
-
教育部為提昇全民資安素養與電腦防護能力,本部於101年9月5日至11月5日舉辦「全民資安素養自我評量」活動,請在活動期間內踴躍上網檢測資訊安全素養認知程度,並有機會參與抽獎,詳情請參閱活動網站(網址: https://isafe.moe.edu.tw/event
-
url="https://www.twse.com.tw/exchangeReport/STOCK_DAY?response=json&date=20220330&stockNo=2330"
-
XOR prefixsum CPP python解Leetcode 1829 Maximum XOR for Each Query 其實這裡考慮的是元素個數為2^maximumBit的交換群,運算子為XOR。 [Python code請進]
-
Python C++使用字串find迴圈速解Leetcode 2490 Circular Sentence C++ & Python都有字串的find,用法都類似 split=s.find(' ', split+1)能找到s從index=split+1開...
-
你會用C的算子sizeof?
-
先說明一下這是後知後覺的解答,所謂後知就是股票價格已知存在陣列(清單),當然就要用迴圈練習,雙迴圈暴力解需時O(n**2),當然不用,採python單一迴圈解答「最佳股票的買賣時機#LeetCode 121 Best Time to Buy and Sell Stock」,解...
-
Colab上安裝中文字型修改股市爬蟲pyplot顯圖 使用python套件: numpy, requests. pyplot, matplotlib.font_manager, matplotlib.mpl
-
2 pointer Python C++解Leetcode 3163 String Compression III [codes on Leetcode] https://leetcode.com/problems/string-compression-iii/solution...
24 則留言:
import java.util.Scanner;
public class ex2b {
public static void main(String[] args) {
Scanner aaa = new Scanner(System.in);
System.out.print("請輸入名字:");
String x;
x = aaa.nextLine();
System.out.println("請輸入身高:");
double h;
h = aaa.nextDouble();
System.out.println("請輸入體重:");
double w;
w = aaa.nextDouble();
System.out.println(x+"的BMI為"+w*10000/(h*h));
}
}
package d;
import java.util.*;
public class HL {
public static void main(String[] args){
Scanner X=new Scanner(System.in);
System.out.println("請輸入姓名>");
String z=X.nextLine();
System.out.println("大名是"+z);
}
import java.util.Scanner;
public class sa {
public static void main(String[] args) {
Scanner x=new Scanner(System.in);
System.out.println("請輸入姓名");
String y=x.nextLine();
System.out.println(y);
}
}
import java.util.*;
public class aa {
public static void main(String[] args){
Scanner X=new Scanner(System.in);
System.out.println("請輸入姓名>");
String z=X.nextLine();
System.out.println("大名是"+z);
}
}
import java.util.Scanner;
public class ex1 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String n;
double h;
double w;
System.out.println("請輸入姓名");
n=scan.nextLine();
System.out.println("請輸入身高");
h=scan.nextDouble();
System.out.println("請輸入體重");
w=scan.nextDouble();
System.out.println(n+"的BMI值="+w*10000/(h*h));
}
}
import java.util.*;
public class ex20 {
public static void main(String[] args) {
Scanner aaa=new Scanner(System.in);
System.out.println("請輸入姓名:");
String X;
X= aaa.nextLine();
System.out.println("請輸入身高:");
double Y;
Y= aaa.nextDouble();
System.out.println("請輸入體重:");
double E;
E= aaa.nextDouble();
System.out.println(X+"的BMI為"+E*10000/(Y*Y));
import java.util.*;
public class ex1 {
public static void main(String[] args) {
Scanner aaa=new Scanner(System.in);
System.out.println("請輸入姓名");
String X;
X=aaa.nextLine();
System.out.println("請輸入身高");
double Y;
Y=aaa.nextDouble();
System.out.println("請輸入體重");
double E;
E=aaa.nextDouble();
System.out.println(X+"的BMI為"+E*10000/(Y*Y));
import java.util.Scanner;
public class sa {
public static void main(String[] args) {
Scanner x=new Scanner(System.in);
System.out.println("請輸入姓名");
String y=x.nextLine();
System.out.println(y);
}
}
import java.util.Scanner;
public class ggg {
public static void main(String[] args) {
Scanner a=new Scanner(System.in);
System.out.println("name");
String s=a.nextLine();
System.out.println("height");
double d=a.nextDouble();
System.out.println("weight");
double f=a.nextDouble();
System.out.println(s+"的BMI"+f*10000/(d*d));
}
}
import java.util.*;
public class ex20 {
public static void main(String[] args) {
Scanner aaa=new Scanner(System.in);
System.out.println("請輸入姓名:");
String X;
X= aaa.nextLine();
System.out.println("請輸入身高:");
double Y;
Y= aaa.nextDouble();
System.out.println("請輸入體重:");
double E;
E= aaa.nextDouble();
System.out.println(X+"的BMI為"+E*10000/(Y*Y));
import java.util.Scanner;
public class sa {
public static void main(String[] args) {
Scanner x=new Scanner(System.in);
System.out.println("請輸入姓名");
String y=x.nextLine();
System.out.println(y);
}
}
import java.util.*;
public class Hello {
public static void main(String[] args) {
float m,w,bmi0;
Scanner x=new Scanner(System.in);
m=x.nextFloat();
System.out.println("身高"+m);
w=x.nextFloat();
System.out.println("kg"+w);
bmi0=w*10000/(m*m);
System.out.println("bmi="+bmi0);
}
}
------------------------------------------------------------
import java.util.*;
public class one {
public static void main(String[] args) {
Scanner X=new Scanner(System.in);
System.out.println("輸入姓名>>");
String z=X.nextLine();
System.out.println("大名是:"+z);
}
------------------------------------------------------------
}
import java.util.*;
public class bmmmmm {
public static void main(String[] args) {
float m,w,bmi0;
Scanner x=new Scanner(System.in);
m=x.nextFloat();
System.out.println("Height"+m);
w=x.nextFloat();
System.out.println("Weight"+w);
bmi0=w*1000/(m*m);
System.out.println("bmi="+bmi0);
}
}
------------------------------------------------------------
import java.util.Scanner;
public class HA {
public static void main(String[] args) {
Scanner x=new Scanner(System.in);
System.out.println("請輸入姓名>");
String z=x.nextLine();
System.out.println("大名是"+z);
}
}
import java.util.*;
public class ex2 {
public static void main(String[] args) {
float m,w,bmi0;
Scanner x=new Scanner(System.in);
m=x.nextFloat();
System.out.println("身高"+m);
w=x.nextFloat();
System.out.println("公斤"+w);
bmi0=w*10000/(m*m);
System.out.println("bmi="+bmi0);
}
}
import java.util.*;
public class ex1 {
public static void main(String[] args) {
Scanner x=new Scanner(System.in);
System.out.println("請輸入姓名>");
String z=x.nextLine();
System.out.println("大名是"+z);
}
}
import java.util.Scanner;
public class ex1 {
public static void main(String[] args) {
Scanner x=new Scanner(System.in);
System.out.println("請輸入姓名>");
String z=x.nextLine();
System.out.println("大名是"+z);
}
}
import java.util.*;
public class ex2b {
public static void main(String[] args) {
float m,w,bmi0;
Scanner x=new Scanner(System.in);
m=x.nextFloat();
System.out.println("身高"+m);
w=x.nextFloat();
System.out.println("kg"+w);
bmi0=w*10000/(m*m);
System.out.println("bmi="+bmi0);
}
}
package d;
import java.util.*;
public class BMI {
public static void main(String[]args){
float m,w,bmi0;
Scanner x=new Scanner(System.in);
m=x.nextFloat();
System.out.println("身高"+m);
w=x.nextFloat();
System.out.println("kg"+w);
bmi0=w*10000/(m*m);
System.out.println("bmi="+bmi0);
}
}
import java.util.Scanner;
public class ex2
{
public static void main(String[] args) {
double m,w,bmi; //m=身高 w=體重
Scanner x=new Scanner(System.in);
System.out.println("請輸入姓名");
String z=x.nextLine();
//System.out.println("大名是"+z);
System.out.println("請輸入身高");
m=x.nextDouble();
//System.out.println("身高"+m);
System.out.println("請輸入體重");
w=x.nextDouble();
//System.out.println("體重"+w);
bmi=w*10000/(m*m);
System.out.println(z+"的bmi="+bmi);
}
}
mport java.util.Scanner;
public class ex2
{
public static void main(String[] args) {
double m,w,bmi; //m=身高 w=體重
Scanner x=new Scanner(System.in);
System.out.println("請輸入姓名");
String z=x.nextLine();
//System.out.println("大名是"+z);
System.out.println("請輸入身高");
m=x.nextDouble();
//System.out.println("身高"+m);
System.out.println("請輸入體重");
w=x.nextDouble();
//System.out.println("體重"+w);
bmi=w*10000/(m*m);
System.out.println(z+"的bmi="+bmi);
}
}
mport java.util.Scanner;
public class ex2
{
public static void main(String[] args) {
double m,w,bmi; //m=身高 w=體重
Scanner x=new Scanner(System.in);
System.out.println("請輸入姓名");
String z=x.nextLine();
//System.out.println("大名是"+z);
System.out.println("請輸入身高");
m=x.nextDouble();
//System.out.println("身高"+m);
System.out.println("請輸入體重");
w=x.nextDouble();
//System.out.println("體重"+w);
bmi=w*10000/(m*m);
System.out.println(z+"的bmi="+bmi);
}
}
mport java.util.Scanner;
public class ex2
{
public static void main(String[] args) {
double m,w,bmi; //m=身高 w=體重
Scanner x=new Scanner(System.in);
System.out.println("請輸入姓名");
String z=x.nextLine();
//System.out.println("大名是"+z);
System.out.println("請輸入身高");
m=x.nextDouble();
//System.out.println("身高"+m);
System.out.println("請輸入體重");
w=x.nextDouble();
//System.out.println("體重"+w);
bmi=w*10000/(m*m);
System.out.println(z+"的bmi="+bmi);
}
}
import java.util.*;
public class aa {
public static void main(String[] args){
float m,w,bmi0;
Scanner X=new Scanner(System.in);
System.out.println("請輸入姓名>");
String z=X.nextLine();
//System.out.println("大名是"+z);
System.out.println("請輸入身高>");
m=X.nextFloat();
//System.out.println("身高"+m);
System.out.println("請輸入kg");
w=X.nextFloat();
// System.out.println("kg"+w);
bmi0=w*10000/(m*m);
System.out.println(z+"bmi="+bmi0);
}
}
張貼留言