iT邦幫忙

0

Day 4|運算子與條件判斷

c#
  • 分享至 

  • xImage
  •  

今日學習目標

  • 學習內容: 算術運算子、比較運算子、邏輯運算子、if、else、switch。
  • 今日實作: 根據任務是否完成,顯示「待處理」或「已完成」,並加入任務時間判斷。
  • 完成標準: 能根據不同條件執行不同程式碼。

認識三種運算子

1.算術運算子

https://ithelp.ithome.com.tw/upload/images/20261013/20184430Efoz0fBWa6.png.

2.比較運算子

https://ithelp.ithome.com.tw/upload/images/20261013/20184430O20bJfmvop.png

3.邏輯運算子

https://ithelp.ithome.com.tw/upload/images/20261013/20184430RFNnvrW50R.png

if 與 else

https://ithelp.ithome.com.tw/upload/images/20261014/20184430FGH17DvNKy.png

switch

https://ithelp.ithome.com.tw/upload/images/20261014/201844307NYfnYUKGt.png

實作

https://ithelp.ithome.com.tw/upload/images/20261014/20184430X6py0xZMd9.pnghttps://ithelp.ithome.com.tw/upload/images/20261014/20184430JfGoovV13Z.png


*提醒邦友,使用第三方服務/API 時,請務必評估資安風險與隱私保護
圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言