欢迎光临散文网 会员登陆 & 注册

Java计算圆的容积和体积

2023-02-20 23:09 作者:你爹的欧尼酱  | 我要投稿

package project

import java.net.SocketTimeoutException;

public class test {

    static String test1="hello";

    public static void main(String[] args){

        String test2="world";

        System.out.println("hello world!");

        int r =5,h = 3 ;

        double area=Math.PI*r*r;

        double volume=area*3;

        double rom=volume*750;

        System.out.println("体积大小是:"+volume);

        System.out.println("容积大小是:"+rom);

}

}

Java计算圆的容积和体积的评论 (共 条)

分享到微博请遵守国家法律