---
# System prepended metadata

title: 判斷閏年平年

---

# 判斷閏年平年
```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(yes)->cond1
cond(no)->mg1->op0->ed
cond1(yes)->cond2
cond1(no)->mg1
cond2(yes)->cond3
cond2(no)->mg0
cond3(yes)->mg0->op0->ed
cond3(no)->mg1

```