java 输入半径输出圆周长跟面积
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/19 02:51:26
classCircle{private:intm_nR;public:Circle(intnR){m_nR=nR;}floatOutputF(){return2*3.1415926*(float)m_
太水了,按你写的输入输出格式声明变量,然后把这几行输入输出格式都写在主函数里
A圆的半径是4厘米,b圆的直径是6厘米,a圆直径是b圆半径的(3分之2),a圆周长是b圆周长的(3分之2),a圆面积是b圆面积的(9分之4)
#include#includeusingnamespacestd;classCircle{doubler,Area,Circumference;public:Circle(doublea=0);Ci
是用C语言么?求采纳
importjava.util.Scanner;publicclassTest{publicstaticvoidmain(String[]args){Scannerinput=newScanner(S
#includeusingnamespacestd;classcircle{private:doubleradius;public:circle(doubler=0.0);voidinput();do
这种下程序自己写很容易的,没给你做结果长度的限制,那个也很简单,用NumberFormat就可以,http://hi.baidu.com/love_12365/item/ecd0b5cb10ef8a4
PrivateSubCommand1_Click()DimbjAsSingleDimzzAsSingleDimmjAsSinglebj=CSng(Text1.Text)Ifbj
#include#include#defineP3.14doublearea(doubler){returnP*r*r;}doubleCircumference(doubler){return2*P*
doubler,h,c,s,t,v,sv;sacnf("%f%f\n",&r,&h);c=2*3.14*r;s=3.14*r*r;t=4*3.14*r*r;v=(4/3)*3.14*r*r*r;sv=
ConstPI=3.14159DimrAsDoubleDimCAsDoubleDimSAsDoubleIfIsNumeric(Text1.Text)Thenr=Val(Text1.Text)C=2*P
#include"stdafx.h"#include#includeusingnamespacestd;classCircle{doubler,Area,Circumference;public:Ci
importjava.io.BufferedReader;importjava.io.IOException;importjava.io.InputStreamReader;publicclassBa
import java.util.Scanner;class Test{\x09public static void main(String[]&nb
input"输入半径:"torc=2*3.14*rs=3.14*r*rv=4*3.14*r^3/3?"圆周长=",c?"圆面积=",s?"球体积=",v
C=2πr(C是周长,π约为3.14)
#include#definePI3.14159main(){\x09intr,h;\x09floats,vz;\x09scanf("%d%d",&r,&h);s=r*r*PI;\x09vz=s*h;
1.#include#include#definepi3.1415926voidmain(){doublex,y,z;scanf("%lf",&x);if(x>0)y=2*pi*x;z=pi*x*x;
S=πr*r+1/2*6*2πr=7π底面积=πr*r侧面积=1/2*底面圆的周长(2πr)*母线长(6)