66问答网
所有问题
有没有大神帮忙写个程序。。 输入一个圆的半径(double),求这个圆的
有没有大神帮忙写个程序。。
输入一个圆的半径(double),求这个圆的面积和周长
输入一个圆的半径(double),求这个圆的面积和周长。
举报该问题
推荐答案 2016-09-18
#include<stdio.h>
int main()
{
const double pi =3.14159;
double r;
printf("inpput r:");
scanf("%lf",&r);
printf("面积=%lf\n",pi*r*r);
printf("周长=%lf\n",2*pi*r);
return 0;
}
温馨提示:答案为网友推荐,仅供参考
当前网址:
http://66.wendadaohang.com/zd/Dp2pUspDp9DinpvUnD.html
相似回答
...编写一个应用
程序,
要求从键盘
输入一个double
型的
圆的半径,
计算并输...
答:
import java.util.Scanner;public class Circle{ public static void main(String[] args){
double
r; Scanner s = new Scanner(System.in); while(true){ try{ r = Double.parse
Double(
s.next()); if(r<0) throw new NegativeException(); else if(r<1.0||...
求C++编程
大神
:
输入一个圆半径
r,当r>=0时,计算并输出
圆的
面积和周长...
答:
include <iostream>#include <cmath>using namespace std;int main(){
double
r = -1; cout<<"请
输入半径
r:"; cin>>r; if(r >= 0) { cout<<"
圆的
周长为:"<<2*M_PI*r<<endl; cout<<"圆的面积为:"<<M_PI*r*r<<endl; } else cout<<"圆...
求
大神帮忙,
用c语言
写一个程序
。
答:
include <stdio.h>int main(){ float r; float c,s; scanf("%f",&r); c=2*3.14*r; s=3.14*r*r; printf("%f %f\n", c,s); return 0;}
C语言编程:已知
圆半径
及圆柱高
,求圆
周长,圆柱体积.要求对
输入
输出做提...
答:
include <stdio.h>#define PI 3.14159void main(){float r,h;printf("
输入圆半径
、圆柱高: ");scanf("%f%f",&r,&h);printf("圆周长=%.2f\n",r*PI*2);printf("圆柱体积=%.2f",h*r*r*PI);}
用C语言编写“求两
个圆
之间的距离,相离,相切或相交”
答:
include <stdio.h>#include <math.h>int main(){
double
x1,x2,y1,y2,r1,r2,d; printf("请
输入圆1的
圆心坐标和
半径
:"); scanf("%lf%lf%lf",&x1,&y1,&r1); printf("请输入圆2的圆心坐标和半径:"); scanf("%lf%lf%lf",&x2,&y2,&r2); d=sqrt((x1-x2)*(x1-...
python“半圆弧的长度”
输入圆的半径,求
半圆弧的长度(使用math库的pi常...
答:
具体代码如下:>>> from math import pi >>> r = float(input("请
输入圆的半径
:")) #设置键盘输入 请输入圆的半径:2 >>> l = round(pi*r, 2) #计算半圆弧长,保留两位小数 >>> print("L=%s"%str(l), end='') # 无空行输出 L=6.28 >>> ...
大家正在搜
无法定位程序输入点dll
圆的程序怎么编程
如何用程序画一个圆
为什么无法定位程序输入点
电脑提示无法定位程序输入点
打开显示无法定位程序输入点
游戏无法定位程序输入点
发那科怎么输入程序
法兰克系统怎么输入程序
相关问题
用C语言写个程序 输入一个圆的半径(double),求这个圆...
用java编写一个应用程序,要求用户输入一个圆的半径(dou...
大神帮我求圆半径
在线等~~~ java c语言帝。编写一个应用程序,要求从键...
用java 编写一个程序,要求输入圆的半径,求圆的周长,面积...
试编写一个java应用程序,要求输入一个圆的半径,输出其面积
编写一个c语言程序,要求输入圆的半径r,圆柱高h,求圆的周长...
求大神编写一个求圆的面积的程序....