這是Herr Deng桑的教學blog,主要處理作業與班導事務,另外還有數位小品。
import java.util.*; public class num { 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); System.out.println("BMI="+(y/(x*x))); }}
package text;import java.util.*;public class hello { 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);System.out.println("BMI="+y/(x*x)); }}
package hello;import java.util.Scanner;public class class311 { 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)); }}
package hello;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)); }}輸入整數m(公尺)=1.681.68輸入整數w(公斤)=5050.0BMI=17.71541950113379
package she;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("w/(m*m)"+w/(m*m)); }}
package ttt;import java.util.Scanner;public class wwwww { 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*w)); }}
import java.util.Scanner;public class java { 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 w=input.nextDouble(); System.out.println(w); System.out.println("BMI="+(w/(m*m))); }}
package hello311;import java.util.*;public class java311 { 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)); }}
package hello;import java.util.*;public class hi { 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)); }}
package hello;import java.util.*;public class hello311 { 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)); }}輸入整數m(公尺)1.501.5輸入整數w(公斤)4040.0BMI=17.77777777777778
package ddddddd;import java.util.Scanner;public class rrrrrr { 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*w)); }}
package hello311;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("w/(m*m)"+w/(m*m)); } }
package hello;import java.util.*;public class hi { 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)); }}
package hello;public class hello123 { public static void main(String[] args) { import java.util.*; public class TestBMI{ public static void main(String[] args) { String name; double h, w, bmi; Scanner getvar1 = new Scanner(System.in); System.out.println( "請輸入姓名(name):" ); name =getvar1.next(); System.out.println( "請輸入身高(M):" ); h = getvar1.nextDouble(); System.out.println( "請輸入體重(KG):" ); w = getvar1.nextDouble(); bmi = w/((h/100)*(h/100)); System.out.printf( "你的BMI為:%2.2f " , bmi); } } }}
import java.util.Scanner;public class LaoLin0311 { 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); System.out.println("BMI="+(y/(x*x))); }}
package text;import java.util.*;public class hello { 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);System.out.println("BMI="+y/(x*x)); }}
package aaa;import java.util.Scanner;public class bbb { 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*w)); }}
import java.util.Scanner;public class BWS0311 { 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); System.out.println("BMI="+(y/(x*x))); }}
package hello311;import java.util.Scanner;public class hello { 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); System.out.println("BMI="+(y/(x*x))); }}
package www;import java.util.*;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); System.out.println("BMI="+(y/(x*x))); }
import java.util.*;public class ZZ { 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); System.out.println("BMI="+(y/(x*x))); }}
package quake311;import java.util.*;public class hi { 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)); }}
package quke311;import java.util.*;public class hi { 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)); }}
package test;import java.util.*;public class hello { 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);System.out.println("BMI="+y/(x*x)); }}
package aa;import java.util.*;public class ss {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="); System.out.println("BMI="+(y/(x*x))); }}
package hello; import java.util.*; public class hello311 { 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)); } }輸入整數m(公尺)1.581.58輸入整數w(公斤)5555.0BMI=22.031725684986377
package hello0311;import java.util.Scanner;public class hello0311 { 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("w/(m*m)"+w/(m*m)); }}
import java.util.*; public class num {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);System.out.println("BMI="+(y/(x*x)));}}2014年3月11日 上午10:01匿名 B10233061 吳興強 提到...package text;import java.util.*;public class hello {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);System.out.println("BMI="+y/(x*x));}}
package text;import java.util.*;public class hello {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);System.out.println("BMI="+y/(x*x));}}
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)); }}
package rgr;import java.util.Scanner;public class rgr13 {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("w/(m*m)"+w/(m*m));}}
import java.util.*; public class num {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);System.out.println("BMI="+(y/(x*x)));}}
張貼留言
40 則留言:
import java.util.*;
public class num {
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);
System.out.println("BMI="+(y/(x*x)));
}
}
package text;
import java.util.*;
public class hello {
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);
System.out.println("BMI="+y/(x*x));
}
}
import java.util.*;
public class num {
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);
System.out.println("BMI="+(y/(x*x)));
}
}
package hello;
import java.util.Scanner;
public class class311 {
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));
}
}
package hello;
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));
}
}
輸入整數m(公尺)=
1.68
1.68
輸入整數w(公斤)=
50
50.0
BMI=17.71541950113379
package she;
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("w/(m*m)"+w/(m*m));
}
}
package ttt;
import java.util.Scanner;
public class wwwww {
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*w));
}
}
import java.util.Scanner;
public class java {
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 w=input.nextDouble();
System.out.println(w);
System.out.println("BMI="+(w/(m*m)));
}
}
package hello311;
import java.util.*;
public class java311 {
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));
}
}
package hello;
import java.util.*;
public class hi {
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));
}
}
package hello;
import java.util.*;
public class hello311 {
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));
}
}
輸入整數m(公尺)
1.50
1.5
輸入整數w(公斤)
40
40.0
BMI=17.77777777777778
package she;
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("w/(m*m)"+w/(m*m));
}
}
package she;
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("w/(m*m)"+w/(m*m));
}
}
package ddddddd;
import java.util.Scanner;
public class rrrrrr {
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*w));
}
}
package hello311;
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("w/(m*m)"+w/(m*m));
}
}
package hello;
import java.util.*;
public class hi {
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));
}
}
package hello;
public class hello123 {
public static void main(String[] args) {
import java.util.*;
public class TestBMI{
public static void main(String[] args) {
String name;
double h, w, bmi;
Scanner getvar1 = new Scanner(System.in);
System.out.println( "請輸入姓名(name):" );
name =getvar1.next();
System.out.println( "請輸入身高(M):" );
h = getvar1.nextDouble();
System.out.println( "請輸入體重(KG):" );
w = getvar1.nextDouble();
bmi = w/((h/100)*(h/100));
System.out.printf( "你的BMI為:%2.2f " , bmi);
}
}
}
}
import java.util.Scanner;
public class LaoLin0311 {
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);
System.out.println("BMI="+(y/(x*x)));
}
}
package she;
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("w/(m*m)"+w/(m*m));
}
}
package text;
import java.util.*;
public class hello {
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);
System.out.println("BMI="+y/(x*x));
}
}
package aaa;
import java.util.Scanner;
public class bbb {
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*w));
}
}
import java.util.Scanner;
public class BWS0311 {
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);
System.out.println("BMI="+(y/(x*x)));
}
}
import java.util.Scanner;
public class BWS0311 {
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);
System.out.println("BMI="+(y/(x*x)));
}
}
package hello311;
import java.util.Scanner;
public class hello {
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);
System.out.println("BMI="+(y/(x*x)));
}
}
package www;
import java.util.*;
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);
System.out.println("BMI="+(y/(x*x)));
}
import java.util.*;
public class ZZ {
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);
System.out.println("BMI="+(y/(x*x)));
}
}
package quake311;
import java.util.*;
public class hi {
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));
}
}
package quke311;
import java.util.*;
public class hi {
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));
}
}
package test;
import java.util.*;
public class hello {
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);
System.out.println("BMI="+y/(x*x));
}
}
import java.util.*;
public class ZZ {
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);
System.out.println("BMI="+(y/(x*x)));
}
}
package aa;
import java.util.*;
public class ss {
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=");
System.out.println("BMI="+(y/(x*x)));
}
}
package aaa;
import java.util.Scanner;
public class bbb {
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*w));
}
}
package aaa;
import java.util.Scanner;
public class bbb {
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*w));
}
}
package hello;
import java.util.*;
public class hello311 {
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)); } }
輸入整數m(公尺)
1.58
1.58
輸入整數w(公斤)
55
55.0
BMI=22.031725684986377
package hello0311;
import java.util.Scanner;
public class hello0311 {
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("w/(m*m)"+w/(m*m));
}
}
import java.util.*;
public class num {
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);
System.out.println("BMI="+(y/(x*x)));
}
}
2014年3月11日 上午10:01
匿名 B10233061 吳興強 提到...
package text;
import java.util.*;
public class hello {
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);
System.out.println("BMI="+y/(x*x));
}
}
package text;
import java.util.*;
public class hello {
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);
System.out.println("BMI="+y/(x*x));
}
}
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));
}
}
package rgr;
import java.util.Scanner;
public class rgr13 {
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("w/(m*m)"+w/(m*m));
}
}
import java.util.*;
public class num {
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);
System.out.println("BMI="+(y/(x*x)));
}
}
張貼留言