---
# System prepended metadata

title: "\U0001F3C5 JS 任務 Day7 - if 流程判斷 III"
tags: [軟體工程師體驗營 - 2023]

---

---
tags: 軟體工程師體驗營 - 2023
---

# 🏅 JS 任務 Day7 - if 流程判斷 III

### 題目一：有沒有打折
某廠商大甩賣，折扣表如下：

* 未滿 2000 無折扣
* 2000~2999 9折
* 3000~3999 8折
* 高於 4000 7折

``` =JavaScript
// input 輸入
sale(5000)
sale(2500)
sale(3300)
sale(200)
// output 輸出
3500
2250
2640
200
```
### 題目二：西元轉民國
**台灣/建立時間：1912 年 1 月 1 日**
``` =JavaScript
// input 輸入
CEtoChinese(1977)
CEtoChinese(2022)
CEtoChinese(1666)

// output 輸出
"民國66年"
"民國111年"
"尚未建國"
```

### 題目三：年薪計算機
以下是梅添良軟體公司的計薪方式
* 每個月固定支薪，不幫員工保勞健保
* 三節沒禮金，也沒任何獎金
* 只有月薪、年終
#### 年終計算
* 未滿一年，不會有年終
* 待超過一年的員工，年終會有 1 個月
* 待超過五年的員工，年終會有 1.3 個月
``` =JavaScript
// input 輸入 
// annualSalary(月薪,年資)
annualSalary(10000,0.8)
annualSalary(12000,1.5)
annualSalary(20000,10)
// output 輸出
"120000"
"156000"
"266000"
```

## 魔王題，請不要輕易接觸，會花上 8hr 時間
### 梅添良薪水數字大小寫轉換
* 老闆開發票時，很不擅長數字小寫轉大寫，請幫助他這個金魚腦
``` =JavaScript
// input 輸入
changeCapital(35000)
changeCapital(9876543210)
changeCapital(-33)
changeCapital("安安")
changeCapital("033")
// output 輸出
"參萬伍仟元整"
"玖拾捌億柒仟陸佰伍拾肆萬參仟貳佰壹拾元整"
"格式錯誤"
"格式錯誤"
"參拾參元整"
```

:::spoiler 提示
http://tax.0123456789.tw/
:::


## 回報流程

1. 將答案貼在 Codepen 並複製 Codepen 連結貼至「回報區」回報
（也可以將答案直接貼至「回報區」）

![](https://i.imgur.com/vftL5i0.png)


回報區
---

| 報數 |     Discord 名字     |                              Codepen／其他回饋                              |
|:----:|:--------------------:|:---------------------------------------------------------------------------:|
|  1   |      snow#0255       |             [codepen](https://codepen.io/snow21723/pen/poxpErX)             |
|  2   |     Berlin#7338      |       [codepen](https://codepen.io/3qberlin/pen/vYVpXyJ?editors=0010)       |
|  3   |     chichi#1534      |            [codepen](https://codepen.io/chichihuang/pen/PoyEGje)            |
|  4   |      Tami#6742       |         [CodePen](https://codepen.io/wqsdqbjn-the-vuer/pen/LYgeRWx)         |
|  5   |       翔.#0859       |     [CodePen](https://codepen.io/energy95272z/pen/vYVpXoa?editors=0012)     |
|  6   |     銀光菇#1692      |           [codepen](https://codepen.io/genesynthesis/pen/QWZaKEJ)           |
|  7   |      冬天#5215       |              [codepen](https://codepen.io/winter_/pen/YzJYpVR)              |
|  8   |      Kulimusoda      |     [codepen](https://codepen.io/yuch3n_chen/pen/vYVpybq?editors=0011)      |
|  9   |       Uli#1946       |        [codepen](https://codepen.io/uli1313/pen/XWxVpMy)/魔王題沒做         |
|  10  | charlottelee849#0366 |       [codepen](https://codepen.io/char849/pen/MWPrbyj?editors=0012)        |
|  10  |       mo#0447        |              [codepen](https://codepen.io/mozentw/pen/YzJYpXj)              |
|  11  |       kai#1098       |               [codepen](https://codepen.io/ahkai/pen/VwEymdg)               |
|  12  |      魚翅#3100       |             [codepen](https://codepen.io/Fukahire/pen/oNapYmm)              |
|  13  |    andychiou#4830    |           [codepen](https://codepen.io/andychiou1113/pen/bGmaBod)           |
|  14  |     jia yu#8896      | [codepen](https://codepen.io/fjqxaznl-the-reactor/pen/bGmaqEK?editors=0011) |
|  15  |      羽毛#5463       |            [codepen](https://codepen.io/KYuFeather/pen/dygJvgZ)             |
|  16  |    Izumi 泉#9691     |             [codepen](https://codepen.io/kouta-f2e/pen/poxpNEy)             |
|  17  |      汪汪#4486       |            [Codepen](https://codepen.io/hunwooooof/pen/QWZapMY)             |
|  18  |    satarkuo#5736     |       [Codepen](https://codepen.io/SatarKuo/pen/NWOXpLJ?editors=1111)       |
|  19  |     君Jyun#0147      |            [codepen](https://codepen.io/JyunCodepen/pen/jOeYByd)            |
|  20  |      Judy☻#7874      |       [Codepen](https://codepen.io/hsiaohan/pen/VwEymwx?editors=0012)       |
|  21  |     Rochel#4754      |    [Codepen](https://codepen.io/rochelwang1205/pen/RwexVOX?editors=0010)    |
|  22  |      冷曄#9378       |        [Codepen](https://codepen.io/HgHale/pen/ZEqvyaM?editors=0011)        |
|  23  |    135144365#3152    |       [Codepen](https://codepen.io/Heng902/pen/eYPyRLb?editors=1111)        |
|  24  |     JimWang#6134     |       [Codepen](https://codepen.io/Jim-Wang-the-selector/pen/VwEyWyL)       |
|  25  |      辣椒#1002       |           [Codepen](https://codepen.io/chilichen118/pen/VwEyzWW)            |
|  26  |      泊岸#3466       |     [Codepen](https://codepen.io/qoq77416416/pen/gOBoRqW?editors=0012)      |
|  27  |       Nex#2964       |            [Codepen](https://codepen.io/Samuel_D4C/pen/BaqJQma)             |
|  28  |      vvay#4113       |       [Codepen](https://codepen.io/pellmssx-the-sasster/pen/MWPrEay)        |
|  29  |     黑白兔#0684      |             [Codepen](https://codepen.io/johnny329/pen/PoyEmLq)             |
|  30  |     ChaosTu#9311     |        [codepen](https://codepen.io/torotu/pen/LYgeywq?editors=0012)        |
|  31  |      gahwa#3562      |              [codepen](https://codepen.io/gahwa17/pen/KKGZyPq)              |
|  32  |     Quantum#6093     |           [codepen](https://codepen.io/Min-Hao-Hung/pen/mdzpRre)            |
|  33  |     jackwu#4437      |           [codepen](https://codepen.io/jackwu1588003/pen/QWZaOwv)           |
|  34  | K（アギルダー）#0386 |            [codepen](https://codepen.io/klay376014/pen/abREwbR)             |
|  35  |    Jacky7035#9423    |             [codepen](https://codepen.io/adens123/pen/XWxVVKr)              |
|  36  |     長方形#9612      |               [codepen](https://codepen.io/imjjw/pen/LYgeWbb)               |
|  37  |     jelly77#2088     |     [codepen](https://codepen.io/Ming-chiang/pen/YzJYERq?editors=0011)      |
|  38  |    HsuanTang#1349    |             [codepen](https://codepen.io/HsuanTang/pen/dygJJYp)             |
|  39  |     Snadra#1987      |             [codepen](https://codepen.io/mlqmhltg/pen/oNappKp)              |
|  40  |      Akira#9996      |            [codepen](https://codepen.io/Akira-Chen/pen/OJBzzZo)             |
|  41  |   clairechen#3498    |     [codepen](https://codepen.io/yi-wen-chen/pen/WNaddym?editors=1010)      |
|  42  |      duck#3310       |       [codepen](https://codepen.io/papy0715/pen/eYPyRQx?editors=0010)       |
|  43  |      Janet#5784      |      [codepen](https://codepen.io/janetlinnn/pen/bGmaLoN?editors=1011)      |
|  44  |     wiimax#4564      |      [codepen](https://codepen.io/willismax/pen/OJBzQrP?editors=0011)       |
|  45  |      SKey#9905       |            [codepen](https://codepen.io/Dale-Chien/pen/GRYyQqP)             |
|  46  |     Evaxof#1266      |        [codepen](https://codepen.io/evaxof/pen/ExdoLWj?editors=0010)        |
|  47  |     ray0304#2070     |   [Codepen](https://codepen.io/Ray0304/pen/XWxVazm) / 魔王題有配逐行註解    |
|  48  |   edie599916#7112    |      [codepen](https://codepen.io/Chen-CiCi/pen/ExdoLxY?editors=0010)       |
|  49  |   N0c7iluc3n7#4390   |          [codepen](https://codepen.io/huang-yu-cheng/pen/PoyEaEr)           |
|  50  |      狸貓#5863       |      [codepen](https://codepen.io/tanuki320/pen/gOBoZQK?editors=0011)       |
|  51  |     jimhop#6510      |     [Codepen](https://codepen.io/jimsansssss/pen/KKGZXJW?editors=1111)      |
|  52  |      homer#1525      |             [Codepen](https://codepen.io/Buckhorn/pen/wvYpRZN)              |
|  53  |     wendyli#2155     |     [Codepen](https://codepen.io/rockayumitw/pen/GRYyzrP?editors=0011)      |
|  54  |      兔子#6746       |          [Codepen](https://codepen.io/CarrotDetector/pen/gOBoqXy)           |
|  55  |      PoWei#8484      |   [Codepen](https://codepen.io/harrison-wei-lai/pen/ExdorLo?editors=1012)   |
|  56  |      肉魚#2149       |             [Codepen](https://codepen.io/zoechen13/pen/XWxVQrw)             |
|  57  |      雲漢#5319       |   [codepen](https://codepen.io/keon981/pen/NWOXgpg?editors=0012)(+魔王題)   |
|  57  | Jennifer Chuang#3937 |        [Codepen](https://codepen.io/yujhen/pen/wvYpZbN?editors=1111)        |
|  58  |    alexmav04#5048    |      [Codepen](https://codepen.io/alexmav04/pen/KKGZJjW?editors=0011)       |
|  59  |      姜承#8204       |             [Codepen](https://codepen.io/Troy0718/pen/XWxVvbL)              |
|  60  |       Yuu#5361       |             [Codepen](https://codepen.io/alycehwy/pen/mdzXbzg)              |
|  61  |    Bruce-Lee#0629    | [Codepen](https://codepen.io/xxhdklwi-the-decoder/pen/rNqpWXv?editors=0011) |
|  62  |    peihsuan#6315     |            [Codepen](https://codepen.io/peihsuanlai/pen/oNaEvaP)            |
|  63  |    Pinkstar#4993     |     [Codepen](https://codepen.io/gabriel09772/pen/YzJePLx)(魔王題沒做)      |
|  64  |   andrew0404#4576    |       [Codepen](https://codepen.io/Loonng/pen/xxyYGOr)(魔王題還沒做)        |
|  65  |   肉個阿倫#7172    |      [Codepen](https://codepen.io/i9574385/pen/MWPQYzg)/+魔王題   |
|  66  |   Zhong#8917    |      [Codepen](https://codepen.io/klfjrlod-the-sasster/pen/eYPVzYe)/魔王題沒做   |
|  67  |   Yui1024#8275    |      [Codepen](https://codepen.io/Yuiyuichou/pen/JjmpKQP)
|  68  |   しあわせね#0036    |      [Codepen](https://codepen.io/Front-end-engineer/pen/vYVdgmB?editors=1111)/魔王題沒做   |
| 69 | Eden.C#9359 | [codepen](https://codepen.io/iseden/pen/gOBvmwx)|
| 70 | David0799#4415 | [codepen](https://codepen.io/David0799/pen/BaqYRpb?editors=0010)|
|71|ABOOS#6276|[codepen](https://codepen.io/guhungyin/pen/BaqYZyN?editors=0011)/魔王題沒做|
|72|郭芙蘭#6374|[codepen](https://codepen.io/flora_Kuo/pen/ExdQvRV?editors=0011)/魔王題沒做|
|73|PayRoom#8328|[CodePen](https://codepen.io/water38198/pen/MWPQEbK)
|74|betty#0693|[codepen](https://codepen.io/betty-hu/pen/wvYypKP?editors=0012)/魔王題沒做|
|75|DeLi#8324|[codepen](https://codepen.io/delichaomoon/pen/QWZapNJ)|
|76|MitA#7407|[codepen](https://codepen.io/qaz15996398/pen/eYPVrew)/魔王題沒做|
|77|呵哈#6479|[codepen](https://codepen.io/CHYETI/pen/vYVdrpz)|
|78|鄭舜仁#6606|[codepen](https://codepen.io/randomno/pen/oNaEqpR)/[魔王題](https://codepen.io/randomno/pen/NWOyzwQ)|
|79|yoyo#1003|[codepen](https://codepen.io/pen/mdzpOpY)|
|80|bonnieli1414#4906|[codepen](https://codepen.io/bonnieli1414/pen/MWPQxam?editors=1010)/魔王題沒做|
|81|Hanana#9025|[codepen](https://codepen.io/hananalin/pen/GRYQLrW)/魔王題沒做> <|
|82|提姆#9581|[Codepen](https://codepen.io/timouo/pen/GRYyQjz) / 魔王題沒做|
|83|jun777#2468|[Codepen](https://codepen.io/js18151102/pen/poxaBJK?editors=0011)/魔王題花了3小時@@|
|84|leo.yujie#8280|[Codepen](https://codepen.io/peihsin-the-scripter/pen/VwEXepa) / 魔王題沒做|
|85|鉦勝#8333|[Codepen](https://codepen.io/atckmax823/pen/ZEqxWEz?editors=0011) / 魔王題沒做|
|86|Eero#1147|[Codepen](https://codepen.io/Eero-Chiao/pen/QWZmEWy?editors=1011) / 魔王題沒做|
|87|一瑋#8459|[CodePen](https://codepen.io/zerosula/pen/VwEXKpe)/魔王題沒做|
|88|Jaredlee#5887|[CodePen](https://codepen.io/jared-lee/pen/mdzpByz?editors=0012)/魔王題研究中QQ|
|89|Welly#3964|[CodePen](https://codepen.io/welly09/pen/jOezZVo)/魔王題沒做|
|90|喬喬#2824|[CodePen](https://codepen.io/joanne-wei/pen/NWOYQYX)/魔王題沒做|
|91|東東#5015|[CodePen](https://codepen.io/wearymask/pen/BaqxzGo)|
|92|阿榮#8277|[Codepen](https://codepen.io/codeitaday/pen/xxypLNd)/魔王題沒做|
|93|不要迷戀媽的奶#0295|[Codepen](https://codepen.io/kewdjbwp-the-typescripter/pen/ZEqorZQ?editors=0011)/魔王題沒做|
|94|JasonChang#7847|[Codepen](https://codepen.io/jsonChangJava/pen/gOBKpxo)/魔王題沒做|
|95|小明#4408|[Codepen](https://codepen.io/ujlylmbv-the-lessful/pen/RweJoNo)/魔王題沒做|
|96|咻蹦#1526|[CodePen](https://codepen.io/emmasyu/pen/zYmRzdJ)/魔王題|
|97|Yvonne#2721|[CodePen](https://codepen.io/Evonne/pen/GRYGNPx?editors=0010)/魔王題|
|98|Jarvis莊#8679|[CodePen](https://codepen.io/jason-hsuan/pen/xxyzMRK?editors=0011)/魔王題沒做|
|99|FanJJ#8061|[CodePen](https://codepen.io/yfchenn/pen/bGmKzKK?editors=0012)|
|100|變羊魔法#6372|[CodePen](https://codepen.io/cssf998811/pen/eYPjJwL)/魔王題沒做|
|101|Ling#2765|[CodePen](https://codepen.io/linglingsu/pen/xxyJmyy)/魔王題沒做|
|102|ABow_Chen#0800|[CodePen](https://codepen.io/fred39392001/pen/QWZVjRL)/魔王題沒做|
|103|JhouHank#8132|[CodePen](https://codepen.io/JhouHank/pen/LYgJxxb)/魔王題沒做|
|104| Jenny真#7532 | [CodePen](https://codepen.io/wei-chen-wu/pen/bGmxwaV?editors=1111)/魔王題沒做 |
|105| Ataraxia#9977 | [CodePen](https://codepen.io/ataraxia8888/pen/qBJPWag)/魔王題沒做 |
|106| Billy_Ti#9716 | [CodePen](https://codepen.io/Ti-Show/pen/wvYxPxZ?editors=0012)/魔王題沒做 |
|107| 小魚#8614 | [CodePen](https://codepen.io/gizelliang/pen/bGmQErJ)/魔王題沒做 |
|108| 柚子#3958 | [CodePen](https://codepen.io/as6625998/pen/xxyQOoV?editors=1011)/魔王題沒做 |
|109| hello77tw#5984 | [CodePen](https://codepen.io/luyoyo/pen/zYmyEdE?editors=0012)|
|110| alll6z#9204 | [CodePen](https://codepen.io/A6Z/pen/yLRGxgr)|
|111| Ann Chou#0146 | [CodePen](https://codepen.io/annchou_illu/pen/PoyLgBK)|
|112| Shiloh#8447 | [CodePen](https://codepen.io/pkezwtnq-the-encoder/pen/WNaBXxq?editors=0012)/魔王題沒做|
| 113 | Kaya#8857 | [Codepen](https://codepen.io/laron9486/pen/RwqNaYX) |
| 114 | Tina02#2691 | [CodePen](https://codepen.io/chjitlox-the-bashful/pen/MWzJzNM)/魔王題沒做|
| 115 | Alan#2423 | [CodePen](https://codepen.io/alan0305/pen/PoxBBZM)/魔王題沒做|
| 115 | hoyiiiii | [CodePen](https://codepen.io/hoyii/pen/KKObYdx?editors=0012)|