close
16.已知圓球體積為3分之4πr三次方,試撰寫一程式,可輸入圓球半徑,經計算後輸出圓球體積。
#include<stdlib.h>
#include<stdio.h>
int main()
{
printf("輸入球體半徑:");
float a;
scanf("%f", &a);
float b;
b = 4 * 3.14 * a * a * a / 3;
printf("球體積 = %f", b);
}
文章標籤
全站熱搜