|
第四節 程式結構
下列各題中若使用到重複結構的請分別使用
while結構、do/while結構、及for結構設計
401 設計一個程式求出一個正整數數列中最小的數。數列分別從鍵盤輸入,輸
.. << 詳全文 >>
|
| 回應(3)
| 引用
| 連結 | 2005-01-18 15:14
|
|
第三節 流程圖與演算法
301 由 1 加至 100。請設計一個演算法分別以下列方式表示:
a. 文字敘述
b. 演算法語言
c. 流程圖
#include <stdio.h>
int main()
{
int i, sum;
.. << 詳全文 >>
|
| 回應(0)
| 引用
| 連結 | 2005-01-18 14:50
|
|
第二節(C)
209 從鍵盤輸入兩個整數 a 及 b,請判斷第一個數是否為第二個數的倍數。
#include <stdio.h>
int main()
{
int a, b;
printf("從鍵盤輸入兩個整數 a,b: ");
.. << 詳全文 >>
|
| 回應(0)
| 引用
| 連結 | 2005-01-18 00:25
|
|
第二節(B)
205 從鍵盤輸入圓半徑 r,請輸出直徑、圓週及圓面積。
#include <stdio.h>
int main()
{
float r, d, p, a;
printf("輸入圓半徑 r: ");
scanf("%f&qu .. << 詳全文 >>
|
| 回應(0)
| 引用
| 連結 | 2005-01-18 00:01
|
|