herrDeng網內搜尋
自訂搜尋
Ads
訂閱:
張貼留言 (Atom)
熱門文章
-
計算你的BMI
-
1. 利用遞迴input n算2^n 2. 用C算GCD(3333,456)
-
請用 C/C++/java寫一簡易程式
-
33, 45, 87, 99, 27 算平均
-
BMI (Body Mass Index)= 體重 (kg) / 身高 ^2(m 2 ) 在台灣,行政院衛生署乃根據其相關研究,於2002年4月公佈台灣成人肥胖標準: BMI<18.5 為過輕, 18.5≦BMI<24 為正常體重, 24≦BMI<27 為過重, BM...
-
一、 試利用switch case由程式中直接輸入一個1~7 之間的整數day,代表星期一到星期日。若day 的值是1,則印出 "星期一",若day 的值是2,則印出 "星期二",若day 的值是7,則印出 "星期日",...
-
需要練習的Java程式:
-
用 C/C++算上學期加權平均
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)));
}
}
張貼留言