输入圆的半径r计算并输出圆的面积和周长,Java
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/11 03:47:27
#includeintmain(){floatr,s,l;scanf("%f",&r);s=3.14*r*r;l=2*3.14*r;printf("s=%f,l=%f\n",s,l);return0;
CLEARSETTALKOFFINPUT"请输入半径:"TORL=2*PI()*RS=PI()*R*R"半径为R的圆的周长为:",L"半径为R的圆的面积为:",SSETTALKON
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
#include#defineMianji(x)Pi*r*r#definePi3.1415926intmain(){\x09floatr;\x09printf("请输入半径r:\n");\x09sca
要求用什么语言啊?求简单写个在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(){inti;floatr;floats;floath;floatv;printf("请输入半径:\n");scanf("%f",&r);printf("如果是圆请输入1,如
#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
constpi=3.1416subcircle(byvalrassingle,Lassingle,aassingle,VASSINGLE)L=2*pi*rA=pi*r*rV=4/3*r*r*r*pie
C编程求助编写一个基于对象的程序:输入半径,计算圆的周长和面积并输出实现#include
用C语言写一段:#include“stdio.h”#definePI3.1416voidmain(){intr;floatc,s;scanf("%d",&r);c=PI*2*r;s=PI*r*r;pr
//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