求长方形和圆形面积
实现一个程序(JAVA),能够从屏幕接收输入,作为长方形的边 和圆形的半径,求长方形和圆形面积
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); } }。
问:六年级数学把一个圆形纸片沿着它的半径平均分成若干份以后剪开,用它们拼成一个面积不变的长方形。这个长方形的周长是16.56厘米,长方形的宽与圆形纸片的半径相等。这个圆形纸片的面积是多少平方厘米?
答:解: 圆的半径为R,面积为πR^ 长方形宽为R,长为L=(16.56-2R)/2=8.28-R,面积S=RL ∵用它们拼成一个面积不变的长方形 ∴8.28R-...详情>>