### 學習繪製流程圖 -- 以判斷閏年、平年為例 ```flow st=>start: 開始 ed=>end: 結束 mg0=>operation: msg = "是閏年" mg1=>operation: msg = "是平年" io0=>inputoutput: 給定一個正整數yr op0=>operation: msg = yr.toString() + msg cond=>condition: yr為偶數? cond1=>condition: yr可以被4整除? cond2=>condition: yr可以被100整除? cond3=>condition: yr可以被400整除? st->io0->cond cond(no)->mg1 cond(yes)->cond1 cond1(yes)->cond2 cond1(no)->mg1 cond2(no)->mg0 cond2(yes)->cond3 cond3(no)->mg1 cond3(yes)->mg0 mg1->op0 mg0->op0 op0->ed ``` ### CSMA/CD 流程圖 ```flow st=>start: 開始 ed0=>end: 送出成功 ed1=>end: 放棄傳送 temp=>operation: CSMA/CD op0=>operation: 延遲一段時間 op1=>operation: 延遲9.6us送出資料框 op2=>operation: 算出隨機等待時間 op3=>operation: 等待一段隨機時間 cond0=>condition: 網路有空? cond1=>condition: 發生碰撞? cond2=>condition: 未達15次? st->temp->cond0 cond0(no)->op0(top)->temp cond0(yes)->op1->cond1 cond1(yes)->cond2 cond1(no)->ed0 cond2(yes)->op2->op3 cond2(no)->ed1 op3(bottom)->temp ``` # 台中市計程車費率 ```flow st=>start: 開始 ed=>end: 結束 io=>inputoutput: 搭乘里程D(公尺) ot=>inputoutput: 車資費用(元)F = 85 + C * 5 ot1=>inputoutput: 車資85元 cond1=>condition: D >= 1500? cond2=>condition: M <> 0? op2=>operation: M = 取餘數( (D - 1500) / 200 ) op3=>operation: 跳錶次數C = 無條件進位( (D - 1500) / 200 ) +1 op4=>operation: 跳錶次數C = 無條件進位( (D - 1500) / 200 ) st->io->cond1 cond1(no)->ot1->ed cond1(yes)->op2 op2->cond2 cond2(no)->op3 cond2(yes)->op4 op3->ot op4->ot ot->ed ``` # 傅里德曼方程式 $$ H^2 = \Big( {\dot{a} \over a} \Big)^2 = {8 \pi G \over 3}\rho - {kc^2 \over a^2} + {\Lambda c^2 \over 3} $$ $$ x = \Big( {{-b \pm \sqrt{b^2 -4ac}} \over2a} \Big) $$ $$ \sum_{i=1}^{100} i = {1 + 2 + 3 + ... + 100} = 5050 $$