题解 | #计算体重指数#

计算体重指数

http://www.nowcoder.com/practice/422f6341cf1b4212a7f8c703df111389

import java.util.Scanner;
public class Main {
    
    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        int weight = sc.nextInt();
        double height = sc.nextInt()*0.01;
        double bmi = weight / (height * height);
        System.out.println(String.format("%.2f",bmi));
    }
}
全部评论

相关推荐

2025-12-29 22:46
武汉大学 Java
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务