#include<stdio.h>int main(){float r,pi=3.14;float h,c,s,bs,tj,ytj;printf("请输入圆的半径以及高\n"); scanf("%f %f",&r,&h);printf("圆的半径为:%f\n",r);printf("圆的高为:%f\n",h);printf("\n\n\n\n");c = 2*pi*r;s = pi*r*r;bs = pi * r;tj = 4/3*pi*r*r*r;ytj = pi * r * r *h;printf("圆的周长为 %0.2f\n",c);printf("\n");printf("圆的面积为 %0.2f\n",s);printf("\n");printf("圆的表面积为 %0.2f\n",bs);printf("\n");printf("圆球的体积为 %0.2f\n",tj);printf("\n");printf("圆柱体的体积为 %0.2f\n",ytj);return 0;}
1200字范文,内容丰富有趣,写作的好帮手!