爱问知识人 爱问教育 医院库

求长方形和圆形面积

首页

求长方形和圆形面积

实现一个程序(JAVA),能够从屏幕接收输入,作为长方形的边

和圆形的半径,求长方形和圆形面积 

提交回答
好评回答
  • 2006-03-25 16:57:42
      import java。util。*;
    public class CalculateArea
    {
       static final double  PI = 3。
      1415926; public static void main(String[] args) { double radius = 0, length = 0,width = 0; Scanner in = new Scanner ( ); intln("please input the radius of the circle"); radius = xtDouble(); intln("The area of the circle is " + PI * radius * radius); intln("please input the length of the rectangle"); length = xtDouble(); intln("please input the width of the rectangle"); width = xtDouble(); intln("The area of the rectangle is " + length * width); } }。

    8***

    2006-03-25 16:57:42

类似问题

换一换

相关推荐

正在加载...
最新问答 推荐信息 热门专题 热点推荐
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200

热点检索

  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 176-195
返回
顶部
帮助 意见
反馈

确定举报此问题

举报原因(必选):