楼主: Lisrelchen
1116 0

Computing BMI using Java [推广有奖]

  • 0关注
  • 62粉丝

VIP

已卖:4194份资源

院士

67%

还不是VIP/贵宾

-

TA的文库  其他...

Bayesian NewOccidental

Spatial Data Analysis

东西方数据挖掘

威望
0
论坛币
50288 个
通用积分
83.6906
学术水平
253 点
热心指数
300 点
信用等级
208 点
经验
41518 点
帖子
3256
精华
14
在线时间
766 小时
注册时间
2006-5-4
最后登录
2022-11-6

楼主
Lisrelchen 发表于 2016-8-31 23:46:06 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
  1. import java.util.Scanner;

  2. public class HelloWorld {
  3.   public static void main(String[] args) {
  4.     Scanner stdin;
  5.     double weight;
  6.     double height;
  7.     double result;
  8.     stdin = new Scanner(System.in);
  9.     System.out.println("Welcome, can you enter your Weight?");
  10.     weight = stdin.nextInt();
  11.     System.out.println("You can enter your Height");
  12.     height = stdin.nextInt();
  13.     // BMI formula ( weight / height * height )
  14.     result = ( weight / (height * height)) * 10000;
  15.     System.out.printf("%n Your weight in kilos: " + weight);
  16.     System.out.printf("%n Your height: " + height);
  17.     System.out.printf("%n Your BMI is " + Math.round(result) + ".");
  18.   }
  19. }
复制代码


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:computing Comput Using comp Java Welcome public double import result

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
扫码
拉您进交流群
GMT+8, 2026-2-6 14:11