输入半径的值,分别计算并输出圆的面积.圆的周长和球的体积.
来源:学生作业帮助网 编辑:作业帮 时间:2024/08/19 15:34:48
![输入半径的值,分别计算并输出圆的面积.圆的周长和球的体积.](/uploads/image/f/7442228-20-8.jpg?t=%E8%BE%93%E5%85%A5%E5%8D%8A%E5%BE%84%E7%9A%84%E5%80%BC%2C%E5%88%86%E5%88%AB%E8%AE%A1%E7%AE%97%E5%B9%B6%E8%BE%93%E5%87%BA%E5%9C%86%E7%9A%84%E9%9D%A2%E7%A7%AF.%E5%9C%86%E7%9A%84%E5%91%A8%E9%95%BF%E5%92%8C%E7%90%83%E7%9A%84%E4%BD%93%E7%A7%AF.)
varch:char;//第一行输入的字符r,x,y,z,a,b:longint;//r为半径,x,y,z为三角形边长,a,b为长宽p:double;//p为海伦公式里的一个量beginreadln(
#include#definePI3.1415926\x05\x05voidmain()\x05{\x05doubler,s;scanf("%f",&r);s=PI*r*r;\x05printf("A
#include#includeusingnamespacestd;classCircle{doubler,Area,Circumference;public:Circle(doublea=0);Ci
这种下程序自己写很容易的,没给你做结果长度的限制,那个也很简单,用NumberFormat就可以,http://hi.baidu.com/love_12365/item/ecd0b5cb10ef8a4
PublicSubcommand1_click()dimrasintegerr=val(inputbox("请输入半径"))s=3.1415926*r^2msgbox"圆的面积为:"&sendsu
要求用什么语言啊?求简单写个在matlab上跑的:r=input('r=?');D=2*pi*rS=pi*r*r再问:c语言呀哥哥再答:#include#includemain(){floatpi=3
#includeintmain(){doubleR;while(scanf("%lf",&R)!=EOF){printf("%lf\n",R*R*3.14);}return0;}
#include#definepai3.15149256voidmain(){doubler,c,s;printf("pleaseinputr\n")scanf("%lf",&r);printf("c
#includemain(){inta,b;charc;scanf("%d,%d,%c",&a,&b,&c);printf("\na=%d,b=%d,c=%c\n",a,b,c);}输入a,b,c之间
#include#include#definePI3.14159intmain(void){floatr,h,V=0;printf("Pleaseinputr=h=\n");loop:scanf("%
#include"stdafx.h"#include#includeusingnamespacestd;classCircle{doubler,Area,Circumference;public:Ci
#include//希望对您有用#includeintmain(){intx,y;printf("Pleaseenterthenumber:");scanf("%d",&x);if(x
voidmain(){floatx,y;cin>>x;if(x=10)y=3*x-11;elsey=2*x-1;cout
constpi=3.1416subcircle(byvalrassingle,Lassingle,aassingle,VASSINGLE)L=2*pi*rA=pi*r*rV=4/3*r*r*r*pie
#includevoidmain(){inty;//如果是实数可以将int换为floatintx,i;y=0;for(i=0;i
C编程求助编写一个基于对象的程序:输入半径,计算圆的周长和面积并输出实现#include
//1#include<stdio.h>#define PI (3.1415)int main(void){ f
什么语言的?C++的这样写#includevoidmain(){floatb;floatc;b=2*3.14*R*H;c=R*R*3.14*H;cout