C语言编写程序 设圆半径r=2.5,圆柱高h=5,求圆周长.圆面积.圆柱体积.
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/10 02:44:34
#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;
#include <stdio.h>#include <stdlib.h>#include <string.h>#define&nbs
#include<stdio.h>main(){ int a[]={0,1,2,3,4,5,6,7,8,9},i; &nb
voidmain(){floatr,s,l;floatpi=3.1415;printf("输入一个圆的半径:\n");scanf("%f",&r);if(
#includemain(){doublex,y;scanf("%lf",&x);if(x
矩阵加,减比较简单,循环一下所有对应元素就可以了.化上三角,下三角就可解线性方程式了,任务不轻,你也可以网上查找现成的.矩阵乘法,要先判断行列数是否符合乘法要求,再乘.下面给你矩阵乘法部分:#incl
#difinepi3.14#includevoidmain(){floatR=1.5,L,S;L=2*pi*R;S=pi*R*R;printf("L=%fL,S=%fS\n");}
看看这个#include"stdio.h"inthavefive(intx){inta=0;intb=x;for(inti=0;i
#includevoidmain(){intx,y,z,j=0;printf("一百只驴驮一百旦\n");for(x=0;x再问:有错误 if(z%2==0&&3*x+2*y
# include <stdio.h>int main(void){\x05int a,b,s;\x05char c;\x05scanf(
#include#definepi3.14159main(){doubleL,S,V,A,B;/*L是圆周长,S是圆面积,V是圆球体积,A是圆球表面积,B是圆柱面积*/floatr,h;printf(
main(){printf(Ack(2,3));}intAck(inta,intb){if(a==0){returnb+1;}elseif(b==0){returnAck(a-1,1);}elseif
#include <stdio.h>int moreThanAvg(float score[]){ int&nb
#includeintmain(void){intr;\x05doublev;//这个变量应该改为double类型r=10;v=4.0f/3.0f*3.14*r*r*r;printf("V:%lf\n
我给你写算法,但是输出的汉字前缀你自己解决,我不大会在C中用汉字;intn,i,m1,m2;floatp,k;inta[100];printf();scanf("d%",&n);//这里输入nprin
#include<iostream.h>#include<stdio.h>#define PI 3.1415926int main(){ 
#include <stdio.h>int main(){ float x, tax = 0;
#include"stdio.h"#definePI3.141592653//定义πintmain(void){floatC,A,V,r;printf("请输入半径:");//提示输入scanf("%
main(){inta,b,c;c=a+b;scanf("%d%d",&a,&b);printf("%d",c);}
#include#include#includeusingnamespacestd;intmain(){intr=15,h=3;doublec=2*3.14*r;doubles=pow(r,2)*3.