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); 

}

arrow
arrow
    文章標籤
    作業 CH5
    全站熱搜

    小宥韓諾非 發表在 痞客邦 留言(0) 人氣()