TypechoJoeTheme

代码屋

统计
登录
用户名
密码
/
注册
用户名
邮箱

代码屋

拼一个春夏秋冬|赢一个无悔人生
类目归类

java计算圆的周长和面积

2020-10-31
/
1 评论
/
304 阅读
/
正在检测是否收录...
10/31

java计算圆的周长和面积


实例代码

package 圆;

import java.util.Scanner;
public class 圆 {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        System.out.print("请输入圆的半径:");
        Scanner yzl=new Scanner(System.in);
        float san=yzl.nextFloat();
        float i;
        float j;
        i=(float)(2*3.14)*san;
        j=(float)(3.14*(san*san));
        System.out.println("圆的周长为:"+i);
        System.out.print("圆的面积为:"+j);

    }

}

运行结果

Java计算圆的周长和面积
朗读
赞 · 0
赞赏
感谢您的支持,我会继续努力哒!

三合一收款

下面三种方式都支持哦

微信
QQ
支付宝
打开支付宝/微信/QQ扫一扫,即可进行扫码打赏哦
版权属于:

代码屋

本文链接:

https://daimawu.top/Java/1-14.html(转载时请注明本文出处及文章链接)

评论 (1)
  1. 诸葛 作者
    Android · Google Chrome

    {!{data:image/webp;base64,UklGRu4LAABXRUJQVlA4WAoAAAAQAAAATQEAKwEAQUxQSOcKAAAB8If9//m3/f/dai617b6y2rZtvOpZtfVaattTzTSzVc1bVnupktS2kusf19uDeR153F9MREyAJPk/yf//MZ926bjUBqlpHBC/Po8xigM/7G6I9kO/m9MINYD1QCN0xcYPJugl8K+ExuanMfiobKfVxifNDXrSSprT/QymZyh4hIicAIBBpucLOiwiMpr2m54YeoWKE5qYnZrg7CSb6IjZ+ZAOiDqcHqQ3Ot/TT1oIoZHR+ZW6a/I7jTU6MVTEYiZ9YHKyAsAVsWxO501OdfraKoRQ0eCMpPlWspPeMDhHaJCNMNpkcC5SPxvNKcrcZHhKOWyEPAKAAsamDADcFrtfUg9j05b22gqjj43NQIqw1ZyuG5t5NMdWSByAuJymJoJetSWHAKC1qfmTWtmbQmGm5jo9a68tfWposoMz2stLlwxNVTolDk8BQBUz0412OdlMA81MOH3lZAitNzNf0A4nDe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