c语言求半径3.5,高为15的圆柱体体积
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/10 18:26:47
在输入半径的时候,语句改成scanf("%d",&r);不过你最好将半径定义成float型变量,格式的问题
scanf("%d",&r);
3*2=6cm6*6=36cm12*12=144cm√36+144=√180cm答:√180cm数字是不是给错了?或者你自己画个确切一点的图再问:你能用别种方法解答吗?我是六年级诶你那种我还没学再答:
#include#includevoidmain(){inti,j,n,m;int*a=(int*)malloc(sizeof(int)*100);intnum=0;inttue=0;printf("
1.#includeintmain(){floatr,s,l,v;printf("请输入半径\n");scanf("%f",&r);s=3.14*r*r;l=2*3.14*r;v=4.0/3.0*3.
#includeintmain(){doublea=1.5;doubleb=2.3;doublec,d;c=a+a+b+b;d=a*b;printf("面积为%.2f,周长为%.2f",c,d);re
1.#includevoidmain(){floatr,pi=3.1415,v;scanf("%f",&r);v=3.0/4*pi*r*r*r;printf("%f",v);}2..#includev
当∠C=90度时,内切圆的半径r=1/2×(AC+BC-AB)因为AC+BC=7,r=1,所以AB=5,因为面积S=1/2×r×l(其中r、l分别是内切圆的半径和三角形的周长)三角形周长l=AB+BC
#includeintmain(){intr=0;floata=0,l=0;scanf("%d",&r);a=r*r*3.14;l=r*2*3.14;printf("面积:%f,周长:%f",a,l)
#include#definepi3.14159main(){doubleL,S,V,A,B;/*L是圆周长,S是圆面积,V是圆球体积,A是圆球表面积,B是圆柱面积*/floatr,h;printf(
#includemain(){floatpi,r,h,l,s,sq,vq,vz;pi=3.141592654;printf("r=,h=\n");scanf("%f,%f",&r,&h);l=2*pi
#include#includemain(){doublearea,length;doubler=pi=3.1215926area=pi*r*r;length=2*pi*r;}
#includeintmain(void){intr;\x05doublev;//这个变量应该改为double类型r=10;v=4.0f/3.0f*3.14*r*r*r;printf("V:%lf\n
#include#include#definePI3.14159intmain(void){floatr,h,V=0;printf("Pleaseinputr=h=\n");loop:scanf("%
H/R=θ,Rcosθ=L,把数据代入进去就行了
#include<stdio.h>#define Pi 3.14159double Square(double r){ &nb
#include"stdio.h"#definePI3.141592653//定义πintmain(void){floatC,A,V,r;printf("请输入半径:");//提示输入scanf("%
#include#include#defindPI3.141592654main(){doublevolume;floatradius;printf("Inputradius:");scanf("%f
π取3.14(20的平方*3.14*27*1/3+30的平方*3.14*20)*3=203472203472/15的平方/3.14=288cm
#include#include#includeusingnamespacestd;intmain(){intr=15,h=3;doublec=2*3.14*r;doubles=pow(r,2)*3.