herrDeng網內搜尋

自訂搜尋

Ads

2013年5月7日 星期二

利用static方法輸出BMI

利用static方法輸出BMI

56 則留言:

b9833154徐瑋侖 提到...

import java.util.Scanner;


public class test {
public static float abc(float m, float w ){

float bmi ;
bmi= (float)m/(w*w)*10000;


return bmi;
}
public static void main(String[] args) {

int w, m;

System.out.println("請輸入身高");
Scanner a = new Scanner(System.in);
w = a.nextInt();
System.out.println("請輸入體重");
Scanner b = new Scanner(System.in);
m = b.nextInt();


System.out.println(abc(m,w));
}

}

B9933122苑珮婕 提到...

import java.util.Scanner;
public class ex01 {
public static float BMI(float h,float w){
float bmi=w/(h*h)*10000;
return bmi ;
}
public static void main(String[] args) {
Scanner kb=new Scanner(System.in);
float h,w;
System.out.print("Hight=");
h=kb.nextFloat();
System.out.print("weight=");
w=kb.nextFloat();
System.out.println(BMI(h,w));
}
}

b9933179陳俊翰 提到...

import java.util.Scanner;

public class eg0507 {

public static double aaa(double m,double w){
double bmi;
bmi=w/m/m;
return bmi;
}

public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.print("請輸入身高:");
double m=input.nextDouble();
System.out.print("請輸入體重:");
double w=input.nextDouble();
System.out.print(aaa(m,w));
}
}

B9933133張靖 提到...

import java.util.Scanner;

public class Test_01 {
public static float BMI(float h, float w) {
float bmi = w / h / h * 10000;
return bmi;
}

public static void main(String[] args) {
Scanner kb = new Scanner(System.in);
float h, w;
System.out.print("Hight:");
h = kb.nextFloat();
System.out.print("Wight:");
w = kb.nextFloat();
System.out.print(BMI(h, w));
}
}

b9933180陳威羽 提到...

import java.util.Scanner;

public class egg0507 {

public static double ans(double m,double w) {
double bmi;
bmi=w/m/m;
return bmi;
}

public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.print("m");
double m=input.nextDouble();
System.out.print("w");
double w=input.nextDouble();
System.out.print(ans(m,w));
}
}

B10133032黃徐琨 提到...

import java.util.Scanner;


public class sss {
static double printop(double m,double w){
double BMI;
BMI=w/m/m;
return BMI;
}
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
double m,w;
System.out.print("身高");
m=input.nextDouble();
System.out.print("體重");
w=input.nextDouble();
System.out.println(printop(m,w));
}

}

B10133025王柏文 提到...

import java.util.Scanner;


public class sss {
static double printop(double m,double w){
double BMI;
BMI=w/m/m;
return BMI;
}
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
double m,w;
System.out.print("身高");
m=input.nextDouble();
System.out.print("體重");
w=input.nextDouble();
System.out.println(printop(m,w));
}

}

b10133013林子恩 提到...

import java.util.Scanner;
public class pso2 {
static double printpso2(double m,double w){
double BMI;
BMI=w/m/m;
return BMI;
}
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
double m,w;
System.out.print("身高");
m=input.nextDouble();
System.out.print("體重");
w=input.nextDouble();
System.out.println(printpso2(m,w));
}
}

B10036036陸語萱 提到...

import java.util.*;
public class Java {

public static float bim(float m,float w) {
return w/m/m;
}

public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
float m=sc.nextFloat();
float w=sc.nextFloat();
System.out.println(bim(m,w));

}

}

B1003 提到...

import java.util.*;
public class Java {

public static float bim(float m,float w) {
return w/m/m;
}

public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
float m=sc.nextFloat();
float w=sc.nextFloat();
System.out.println(bim(m,w));

}

}

B10036036陸語萱 提到...

import java.util.*;
public class Java {

public static float bim(float m,float w) {
return w/m/m;
}

public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
float m=sc.nextFloat();
float w=sc.nextFloat();
System.out.println(bim(m,w));

}

}

B10133009 王韋翔 提到...

import java.util.*;
public class westr {
static double test11(double m,double w)
{
double bmi;
bmi=m/w/w;
return bmi;
}
public static void main(String[] args)
{
Scanner n=new Scanner(System.in);
System.out.print("身高");
double w=n.nextDouble();

System.out.print("體重");
double m=n.nextDouble();

System.out.print(test11(m,w));
}
}

B10133050張珈祥 提到...

import java.util.*;
public class westr {
static double test11(double m,double w)
{
double bmi;
bmi=m/w/w;
return bmi;
}
public static void main(String[] args)
{
Scanner n=new Scanner(System.in);
System.out.print("身高");
double w=n.nextDouble();

System.out.print("體重");
double m=n.nextDouble();

System.out.print(test11(m,w));
}
}

B10133051張丞緯 提到...

import java.util.*;
public class westr {
static double test11(double m,double w)
{
double bmi;
bmi=m/w/w;
return bmi;
}
public static void main(String[] args)
{
Scanner n=new Scanner(System.in);
System.out.print("身高");
double w=n.nextDouble();
System.out.print("體重");
double m=n.nextDouble();
System.out.print(test11(m,w));
}
}

B10133045林玹安 提到...

import java.util.Scanner;

public class apple {
public static double bmi(double w,double m){
return w/(m*m);
}
public static void main(String[]args){
Scanner x = new Scanner(System.in);
double m = x.nextDouble();
double w = x.nextDouble();
double BMI=bmi(w,m);
System.out.print(BMI);
}


}

B10133016王致翔 提到...

import java.util.Scanner;
public class MtcTW
{
public static double bmi(double m,double w)
{
return w/m/m;
}
public static void main(String[] args)
{
Scanner x = new Scanner(System.in);
double m = x.nextDouble();
double w = x.nextDouble();
double BMI = bmi(w,m);
System.out.println(BMI);
}
}

B10133046 邱誌寬 提到...

import java.util.*;
class FOR{
public static float BMI(float w,float m){
return w/m/m;
}
public static void main(String[]args){
Scanner ww=new Scanner(System.in);
System.out.print("體重");
float w=ww.nextFloat();
System.out.print("身高");
float m=ww.nextFloat();
System.out.print(BMI(w,m));
}
}

B10133038池侑承 提到...

import java.util.Scanner;
public class awing {
public static double bmi(double m,double w) {
return w/m/m;
}
public static void main(String[] args){
Scanner x=new Scanner(System.in);
double m = x.nextDouble();
double w = x.nextDouble();
double BMI=bmi(w,m);
System.out.println(BMI);
}


}

B10133044吳盛盟 提到...

import java.util.*;
class fir{
public static float BMI(float w,float m){
return w/m/m;
}
public static void main (String[]arge){
Scanner ww=new Scanner(System.in);
System.out.print("體重");
float w=ww.nextFloat();
System.out.print("身高");
float m=ww.nextFloat();
System.out.print(BMI(w,m));
}
}

B10133004 徐芷瑩 提到...

package hello509;

import java.util.Scanner;

public class hello123 {
public static double bmi(double m,double w){
return w/m/m;
}


public static void main(String[] args) {
Scanner input=new Scanner(System.in);
double m,w;
System.out.println("身高");
m=input.nextDouble();
System.out.println("體重");
w=input.nextDouble();
Double BMI=bmi(m,w);
System.out.println(BMI);

}

}

B10133010蔡以翎 提到...

package hello509;

import java.util.Scanner;

public class hh {

public static double bmi(double m, double w){
return w/m/m;

}
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
double m,w;
System.out.print("身高");
m=input.nextDouble();
System.out.print("體重");
w=input.nextDouble();
double BMI=bmi(m,w);
System.out.println(BMI);

}

b10133023王志翔 提到...

import java.util.Scanner;
public class sam
{
public static double bmi(double m,double w)
{
return w/m/m;
}
public static void main(String[] args)
{
Scanner x = new Scanner(System.in);
double m = x

B10133047 鄭兆珊 提到...

public class san {

public static double bmi(double m, double w)
{
return w/m/m;
}
public static void main(String[] args)
{
java.util.Scanner sc = new java.util.Scanner(System.in);
double m=sc.nextDouble();
double w=sc.nextDouble();
double Bmi=bmi(m,w);
System.out.println(Bmi);
}

}

b10133023徐顥 提到...

import java.util.Scanner;
public class sam
{
public static double bmi(double m,double w)
{
return w/m/m;
}
public static void main(String[] args)
{
Scanner x = new Scanner(System.in);
double m = x

B10133031 邱敏惠 提到...

public class bmi {

public static double bmi(double m, double w)
{
return w/m/m;
}
public static void main(String[] args)
{
java.util.Scanner sc = new java.util.Scanner(System.in);
double m=sc.nextDouble();
double w=sc.nextDouble();
double Bmi=bmi(m,w);
System.out.println(Bmi);
}

}

B10133042沈俞宜 提到...

public class hello {

public static double bmi(double m, double w)
{
return w/m/m;
}
public static void main(String[] args)
{
java.util.Scanner sc = new java.util.Scanner(System.in);
double m=sc.nextDouble();
double w=sc.nextDouble();
double Bmi=bmi(m,w);
System.out.println(Bmi);
}

}

B10133002 謝佩紋 提到...

public class bmi {

public static double bmi(double m, double w)
{
return w/m/m;
}
public static void main(String[] args)
{
java.util.Scanner sc = new java.util.Scanner(System.in);
double m=sc.nextDouble();
double w=sc.nextDouble();
double Bmi=bmi(m,w);
System.out.println(Bmi);
}

}

B10133011黃怡蓁 提到...

public class hello {
public static double bmi (double m, double w) {
return w/m/m;
}
public static void main(String[] args){
java.util.Scanner sc=new java.util.Scanner (System.in);
double m=sc.nextDouble();
double w=sc.nextDouble();
double Bmi=bmi(m,w);
System.out.println(Bmi);
}

}

B10133036孫翊玲 提到...

package hello0509;
import java.util.Scanner;
public class aa {
public static double bmi(double m , double w){
return w/m/m;
}
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
double m,w;
System.out.print("身高");
m = input.nextDouble();
System.out.print("體重");
w = input.nextDouble();
double BMI=bmi(m,w);
System.out.println("BMI="+w/m/m);
}
}

B10133014 吳欣怡 提到...

public class ex1 {
public static double bmi(double m,double w){
return w/m/m;
}
public static void main(String [] args){
java.util.Scanner sc = new java.util.Scanner(System.in);
double m=sc.nextDouble();
double w=sc.nextDouble();
double Bmi=bmi(m,w);
System.out.println(Bmi);
}
}

B10133048饒家華 提到...

import java.util.*;
public class get {

public static double bmi(double m,double w)
{
return w/m/m;

}
public static void main(String[] args){
Scanner input=new Scanner(System.in);
double m=input.nextDouble();
double w=input.nextDouble();
double BMI=bmi(w,m);
System.out.println(BMI);
}

}

B10133019 王騰侑 提到...

package hello0509;
import java.util.Scanner;
public class aa {
public static double bmi(double m , double w){
return w/m/m;
}
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
double m,w;
System.out.print("身高");
m = input.nextDouble();
System.out.print("體重");
w = input.nextDouble();
double BMI=bmi(m,w);
System.out.println("BMI="+w/m/m);
}
}

B10133030林潔如 提到...

public class hello {

public static double bmi(double m, double w)
{
return 10000*w/m/m;
}
public static void main(String[] args)
{
java.util.Scanner sc = new java.util.Scanner(System.in);
System.out.print("身高:");
double m=sc.nextDouble();
System.out.print("體重:");
double w=sc.nextDouble();
double Bmi=bmi(m,w);
System.out.println(Bmi);
}

}

B10133037施竣哲 提到...

import java.util.Scanner;

public class banana {
public static double bmi(double w,double m){
return w/(m*m);
}
public static void main(String[]args){
Scanner x = new Scanner(System.in);
double m = x.nextDouble();
double w = x.nextDouble();
double BMI=bmi(w,m);System.out.print(BMI);
}


}

B10133018翁湘姿 提到...

public class lang {

public static double bmi(double m, double w)
{
return w/m/m;
}
public static void main(String[] args)
{
java.util.Scanner sc = new java.util.Scanner(System.in);
double m=sc.nextDouble();
double w=sc.nextDouble();
double Bmi=bmi(m,w);
System.out.println(Bmi);
}

}

B10133003王冠文 提到...

import java.util.Scanner;

public class candy {
public static double bmi(double w,double m){
return w/(m*m);
}
public static void main(String[]args){
Scanner x = new Scanner(System.in);
double m = x.nextDouble();
double w = x.nextDouble();
double BMI=bmi(w,m);System.out.print(BMI);
}


}

B10133008許耀文 提到...

import java.util.*;
public class westr {
static double test11(double m,double w)
{
double bmi;
bmi=m/w/w;
return bmi;
}
public static void main(String[] args)
{
Scanner n=new Scanner(System.in);
System.out.print("身高");
double w=n.nextDouble();
System.out.print("體重");
double m=n.nextDouble();
System.out.print(test11(m,w));
}
}

b10133032黃徐琨 提到...

public class abcd {
public static double bmi(double m, double w)
{
return w/m/m;
}
public static void main(String[] args)
{
java.util.Scanner sc = new java.util.Scanner(System.in);
double m=sc.nextDouble();
double w=sc.nextDouble();
double Bmi=bmi(m,w);
System.out.println(Bmi);
}
}

B10133005李沛澤 提到...

public class ccc {
public static double bmi(double m, double w)
{
return w/m/m;
}
public static void main(String[] args)
{
java.util.Scanner sc = new java.util.Scanner(System.in);
double m=sc.nextDouble();
double w=sc.nextDouble();
double Bmi=bmi(m,w);
System.out.println(Bmi);
}
}

B10133017張永憲 提到...

public class bmm {
public static double bmi(double m, double w)
{
return w/m/m;
}
public static void main(String[] args)
{
java.util.Scanner sc = new java.util.Scanner(System.in);
double m=sc.nextDouble();
double w=sc.nextDouble();
double Bmi=bmi(m,w);
System.out.println(Bmi);
}
}

B10133027黃為邦 提到...

public class ass {
public static double bmi(double m, double w)
{
return w/m/m;
}
public static void main(String[] args)
{
java.util.Scanner sc = new java.util.Scanner(System.in);
double m=sc.nextDouble();
double w=sc.nextDouble();
double Bmi=bmi(m,w);
System.out.println(Bmi);
}
}

B10133006 游善棠 提到...

import java.util.Scanner;
public class app {

public static double bmi(double m,double w){

return w/m/m;
}
public static void main(String[] args) {
Scanner x =new Scanner(System.in);
double m=x.nextDouble();
double w=x.nextDouble();
double bmi = bmi(w,m);
System.out.println(bmi);
}

}

B10133040温翊惠 提到...

package hello0509;
import java.util.Scanner;
public class aa {
public static double bmi(double m , double w){
return w/m/m;
}
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
double m,w;
System.out.print("身高");
m = input.nextDouble();
System.out.print("體重");
w = input.nextDouble();
double BMI=bmi(m,w);
System.out.println("BMI="+w/m/m);
}
}

B10133034石嘉萱 提到...

package hello0509;
import java.util.Scanner;
public class aa {
public static double bmi(double m , double w){
return w/m/m;
}
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
double m,w;
System.out.print("身高");
m = input.nextDouble();
System.out.print("體重");
w = input.nextDouble();
double BMI=bmi(m,w);
System.out.println("BMI="+w/m/m);
}
}

B9833091陳孟偉 提到...

public class NYPD {
public static double bmi(double m,double w)
{
return w/m/m;
}
public static void main(String [] args)
{
java.util.Scanner sc = new java.util.Scanner(System.in);
double m=sc.nextDouble();
double w=sc.nextDouble();
double Bmi=bmi(m,w);
System.out.println(Bmi);
}
}

B10133053古聿穎 提到...

import java.util.Scanner;


public class aa {
static double printop(double m,double w){
double BMI;
BMI=w/m/m;
return BMI;
}
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
double m,w;
System.out.print("身高");
m=input.nextDouble();
System.out.print("體重");
w=input.nextDouble();
System.out.println(printop(m,w));
}

}

B9833102曾冠誌 提到...

import java.util.Scanner;

public class eg0507 {

public static double aaa(double m,double w){
double bmi;
bmi=w/m/m;
return bmi;
}

public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.print("請輸入身高:");
double m=input.nextDouble();
System.out.print("請輸入體重:");
double w=input.nextDouble();
System.out.print(aaa(m,w));
}
}

B10133015楊超文 提到...

public class ass {
public static double bmi(double m, double w)
{
return w/m/m;
}
public static void main(String[] args)
{
java.util.Scanner sc = new java.util.Scanner(System.in);
double m=sc.nextDouble();
double w=sc.nextDouble();
double Bmi=bmi(m,w);
System.out.println(Bmi);
}
}

b10133021吳屹軒 提到...

import java.util.*;
class fir{
public static float BMI(float w,float m){
return w/m/m;
}
public static void main (String[]arge){
Scanner ww=new Scanner(System.in);
System.out.print("體重");
float w=ww.nextFloat();
System.out.print("身高");
float m=ww.nextFloat();
System.out.print(BMI(w,m));
}
}

B10133048饒家華 提到...

import java.util.Scanner;


public class sss {
static double printop(double m,double w){
double BMI;
BMI=w/m/m;
return BMI;
}
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
double m,w;
System.out.print("身高");
m=input.nextDouble();
System.out.print("體重");
w=input.nextDouble();
System.out.println(printop(m,w));
}

}


B10133033呂之筠 提到...

import java.util.Scanner;

public class hello {

public static double aaa(double m,double w){
double bmi;
bmi=w/m/m;
return bmi;
}

public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.print("請輸入身高:");
double m=input.nextDouble();
System.out.print("請輸入體重:");
double w=input.nextDouble();
System.out.print(aaa(m,w));
}
}

B10133040溫翊惠 提到...

import java.util.Scanner;


public class aa {
static double printop(double m,double w){
double BMI;
BMI=w/m/m;
return BMI;
}
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
double m,w;
System.out.print("身高");
m=input.nextDouble();
System.out.print("體重");
w=input.nextDouble();
System.out.println(printop(m,w));
}

}

B10133049 連于瑄 提到...

import java.util.Scanner;


public class sss {
static double printop(double m,double w){
double BMI;
BMI=w/m/m;
return BMI;
}
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
double m,w;
System.out.print("身高");
m=input.nextDouble();
System.out.print("體重");
w=input.nextDouble();
System.out.println(printop(m,w));
}

}

B10133019 王騰侑 提到...

import java.util.Scanner;


public class test {
public static float abc(float m, float w ){

float bmi ;
bmi= (float)m/(w*w)*10000;


return bmi;
}
public static void main(String[] args) {

int w, m;

System.out.println("請輸入身高");
Scanner a = new Scanner(System.in);
w = a.nextInt();
System.out.println("請輸入體重");
Scanner b = new Scanner(System.in);
m = b.nextInt();


System.out.println(abc(m,w));
}

}

B10133019 王騰侑 提到...

import java.util.Scanner;


public class test {
public static float abc(float m, float w ){

float bmi ;
bmi= (float)m/(w*w)*10000;


return bmi;
}
public static void main(String[] args) {

int w, m;

System.out.println("請輸入身高");
Scanner a = new Scanner(System.in);
w = a.nextInt();
System.out.println("請輸入體重");
Scanner b = new Scanner(System.in);
m = b.nextInt();


System.out.println(abc(m,w));
}

}

B10133043陳宗霖 提到...

import java.util.Scanner;


public class test {
public static float abc(float m, float w ){

float bmi ;
bmi= (float)m/(w*w)*10000;


return bmi;
}
public static void main(String[] args) {

int w, m;

System.out.println("請輸入身高");
Scanner a = new Scanner(System.in);
w = a.nextInt();
System.out.println("請輸入體重");
Scanner b = new Scanner(System.in);
m = b.nextInt();


System.out.println(abc(m,w));
}

}

Related Posts Plugin for WordPress, Blogger...

熱門文章